Changeset View
Changeset View
Standalone View
Standalone View
src/styles/org.kde.desktop/Units.qml
Context not available. | |||||
9 | 9 | | |||
---|---|---|---|---|---|
10 | pragma Singleton | 10 | pragma Singleton | ||
11 | 11 | | |||
12 | 12 | /** | |||
13 | * A set of values to define semantically sizes and durations | ||||
14 | * @inherit QtQuick.QtObject | ||||
15 | */ | ||||
13 | QtObject { | 16 | QtObject { | ||
14 | id: units | 17 | id: units | ||
15 | 18 | | |||
Context not available. | |||||
68 | * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. | 71 | * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. | ||
69 | * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. | 72 | * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. | ||
70 | */ | 73 | */ | ||
71 | property real devicePixelRatio: Math.max(1, (fontMetrics.font.pixelSize / fontMetrics.font.pointSize)) | 74 | property real devicePixelRatio: Math.max(1, ((fontMetrics.font.pixelSize*0.75) / fontMetrics.font.pointSize)) | ||
72 | 75 | | |||
73 | /** | 76 | /** | ||
74 | * units.veryLongDuration should be used for specialty animations that benefit | 77 | * units.veryLongDuration should be used for specialty animations that benefit | ||
Context not available. | |||||
88 | */ | 91 | */ | ||
89 | property int shortDuration: 150 | 92 | property int shortDuration: 150 | ||
90 | 93 | | |||
94 | /** | ||||
95 | * time in ms by which the display of tooltips will be delayed. | ||||
96 | * | ||||
97 | * @sa ToolTip.delay property | ||||
98 | */ | ||||
91 | property int toolTipDelay: 700 | 99 | property int toolTipDelay: 700 | ||
92 | 100 | | |||
93 | //readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" } | 101 | //readonly property QtObject __styleItem: QtQuickControlsPrivate.StyleItem {elementType: "frame" } | ||
Context not available. | |||||
98 | */ | 106 | */ | ||
99 | readonly property int wheelScrollLines: 3//__styleItem.styleHint("wheelScrollLines") | 107 | readonly property int wheelScrollLines: 3//__styleItem.styleHint("wheelScrollLines") | ||
100 | 108 | | |||
109 | /** | ||||
110 | * metrics used by the default font | ||||
111 | */ | ||||
101 | property variant fontMetrics: TextMetrics { | 112 | property variant fontMetrics: TextMetrics { | ||
102 | text: "M" | 113 | text: "M" | ||
103 | function roundedIconSize(size) { | 114 | function roundedIconSize(size) { | ||
Context not available. |