Kstars

Constants.qml
1// SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4pragma Singleton
5import QtQuick 2.7
6import QtQuick.Window 2.2
7
8QtObject {
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-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.