Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/Label.qml
Show All 18 Lines | |||||
19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | 19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | 22 | | |||
23 | import QtQuick 2.1 | 23 | import QtQuick 2.1 | ||
24 | import QtQuick.Window 2.2 | 24 | import QtQuick.Window 2.2 | ||
25 | import QtQuick.Templates 2.0 as T | 25 | import QtQuick.Templates 2.0 as T | ||
26 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | 26 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | ||
27 | import org.kde.kirigami 2.2 as Kirigami | ||||
27 | 28 | | |||
28 | T.Label { | 29 | T.Label { | ||
29 | id: control | 30 | id: control | ||
30 | 31 | | |||
31 | height: Math.round(Math.max(paintedHeight, StylePrivate.TextSingleton.height * 1.6)) | 32 | height: Math.round(Math.max(paintedHeight, Kirigami.Units * 1.6)) | ||
davidedmundson: This change is unrelated.
Also I said in a review about how we shouldn't be doing this. | |||||
it is as since StylePrivate is mostly binding QPalette colors, all its uses should be eventually removed mart: it is as since StylePrivate is mostly binding QPalette colors, all its uses should be… | |||||
32 | verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter | 33 | verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter | ||
33 | 34 | | |||
34 | activeFocusOnTab: false | 35 | activeFocusOnTab: false | ||
35 | //Text.NativeRendering is broken on non integer pixel ratios | 36 | //Text.NativeRendering is broken on non integer pixel ratios | ||
36 | renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering | 37 | renderType: Window.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering | ||
37 | 38 | | |||
38 | 39 | | |||
39 | //font data is the system one by default | 40 | font.capitalization: Kirigami.Theme.defaultFont.capitalization | ||
40 | color: StylePrivate.SystemPaletteSingleton.text(control.enabled) | 41 | font.family: Kirigami.Theme.defaultFont.family | ||
41 | //StylePrivate.SystemPaletteSingleton doesn't have a link color | 42 | font.italic: Kirigami.Theme.defaultFont.italic | ||
42 | linkColor: "#2196F3" | 43 | font.letterSpacing: Kirigami.Theme.defaultFont.letterSpacing | ||
44 | font.pointSize: Kirigami.Theme.defaultFont.pointSize | ||||
45 | font.strikeout: Kirigami.Theme.defaultFont.strikeout | ||||
46 | font.underline: Kirigami.Theme.defaultFont.underline | ||||
47 | font.weight: Kirigami.Theme.defaultFont.weight | ||||
48 | font.wordSpacing: Kirigami.Theme.defaultFont.wordSpacing | ||||
49 | color: Kirigami.Theme.textColor | ||||
50 | linkColor: Kirigami.Theme.linkColor | ||||
43 | 51 | | |||
44 | opacity: enabled? 1 : 0.6 | 52 | opacity: enabled? 1 : 0.6 | ||
45 | 53 | | |||
46 | Accessible.role: Accessible.StaticText | 54 | Accessible.role: Accessible.StaticText | ||
47 | Accessible.name: text | 55 | Accessible.name: text | ||
48 | } | 56 | } |
This change is unrelated.
Also I said in a review about how we shouldn't be doing this.