summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 11:39:14 -0600
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-26 11:39:14 -0600
commit91431d3694ab6823717eb6b43b669dae87c6d3d6 (patch)
treed8039c4b16d1c615a7d449824cdd669069ea982f
parent7e6bd8ff32aba63ec9a3006904106c5fa4614f1a (diff)
downloadkube-91431d3694ab6823717eb6b43b669dae87c6d3d6.tar.gz
kube-91431d3694ab6823717eb6b43b669dae87c6d3d6.zip
Set an application wide default font.
Theoretically this should be picked up by all qtquickcontrols2 controls, and they should also handle inheriting the fonts to children. Seems to work for AbstractButton, but didn't for the label...
-rw-r--r--components/kube/contents/ui/Kube.qml3
-rw-r--r--framework/qml/AbstractButton.qml3
2 files changed, 3 insertions, 3 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml
index ef500a90..498d987a 100644
--- a/components/kube/contents/ui/Kube.qml
+++ b/components/kube/contents/ui/Kube.qml
@@ -32,6 +32,9 @@ Controls2.ApplicationWindow {
32 width: Screen.desktopAvailableWidth * 0.8 32 width: Screen.desktopAvailableWidth * 0.8
33 visible: true 33 visible: true
34 34
35 //Application default font
36 font.family: Kube.Font.fontFamily
37
35 Kube.Listener { 38 Kube.Listener {
36 filter: Kube.Messages.notification 39 filter: Kube.Messages.notification
37 onMessageReceived: { 40 onMessageReceived: {
diff --git a/framework/qml/AbstractButton.qml b/framework/qml/AbstractButton.qml
index 53926cab..28337681 100644
--- a/framework/qml/AbstractButton.qml
+++ b/framework/qml/AbstractButton.qml
@@ -40,8 +40,6 @@ T.Button {
40 hoverEnabled: true 40 hoverEnabled: true
41 Keys.onReturnPressed: root.clicked() 41 Keys.onReturnPressed: root.clicked()
42 42
43 font.family: Font.fontFamily
44
45 background: Rectangle { 43 background: Rectangle {
46 color: root.color 44 color: root.color
47 45
@@ -74,6 +72,5 @@ T.Button {
74 horizontalAlignment: Text.AlignHCenter 72 horizontalAlignment: Text.AlignHCenter
75 verticalAlignment: Text.AlignVCenter 73 verticalAlignment: Text.AlignVCenter
76 color: root.textColor 74 color: root.textColor
77 font: root.font
78 } 75 }
79} 76}