Kstars

Constants.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 pragma Singleton
5 import QtQuick 2.7
6 import QtQuick.Window 2.2
7 
8 QtObject {
9  property double dpi: Screen.pixelDensity * 25.4
10  property double dpmm: Screen.pixelDensity
11  property double dp: dpi < 160 ? 1 : dpi/160
12  property double pixelRatio: Screen.devicePixelRatio
13  property string density: {
14  if(dpi * pixelRatio <= 120) {
15  return "ldpi"
16  }
17  else if(dpi * pixelRatio <=160) {
18  return "mdpi"
19  }
20  else if(dpi * pixelRatio <= 240) {
21  return "hdpi"
22  }
23  else if(dpi * pixelRatio <= 320) {
24  return "xhdpi"
25  }
26  else if(dpi * pixelRatio <= 480) {
27  return "xxhdpi"
28  }
29  else if(dpi * pixelRatio <=640) {
30  return "xxxhdpi"
31  }
32  }
33  property string iconpath: "../" + "images/" + density + "/icons/"
34  property string imagesPath: "images/" + density + "/"
35  property SystemPalette sysPalette: SystemPalette { }
36 
37  property int marginsKStab: 5 * dp //Margins of KSTab content
38 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:59:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.