From cc9a3b98d143b921388725b55e99ae9e151e525b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 11 Jul 2017 18:17:05 +0200 Subject: Ensure that all items can always be centered. I had a gridUnit of 17, which results in icons being 1 pixel off. --- framework/qml/Units.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'framework/qml') 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 import org.kube.framework 1.0 as Kube Item { - property int gridUnit: fontMetrics.height + //Ensure the gridUnit is divisble by 4 without remainder, otherwise we'll end up with alignment issues + property int gridUnit: Math.ceil(fontMetrics.height / 4) * 4 property int smallSpacing: gridUnit/4 property int largeSpacing: gridUnit -- cgit v1.2.3