summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-11 18:17:05 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-07-11 18:17:05 +0200
commitcc9a3b98d143b921388725b55e99ae9e151e525b (patch)
tree5d723e81315b46172b64b414a98e6169082918f5 /framework/qml
parenta767ca53c0c0722223bc6c646776456f5484b31f (diff)
downloadkube-cc9a3b98d143b921388725b55e99ae9e151e525b.tar.gz
kube-cc9a3b98d143b921388725b55e99ae9e151e525b.zip
Ensure that all items can always be centered.
I had a gridUnit of 17, which results in icons being 1 pixel off.
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/Units.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/qml/Units.qml b/framework/qml/Units.qml
index 6d66bf5c..d583c87b 100644
--- a/framework/qml/Units.qml
+++ b/framework/qml/Units.qml
@@ -23,7 +23,8 @@ import QtQuick 2.7
23import org.kube.framework 1.0 as Kube 23import org.kube.framework 1.0 as Kube
24 24
25Item { 25Item {
26 property int gridUnit: fontMetrics.height 26 //Ensure the gridUnit is divisble by 4 without remainder, otherwise we'll end up with alignment issues
27 property int gridUnit: Math.ceil(fontMetrics.height / 4) * 4
27 property int smallSpacing: gridUnit/4 28 property int smallSpacing: gridUnit/4
28 property int largeSpacing: gridUnit 29 property int largeSpacing: gridUnit
29 30