From fee4363ccde2afefe0efa38a1b1f3664def0e256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 17 May 2019 11:22:11 -0300 Subject: [PATCH] ScreenTools: Use an odd number to allow centralization of checkBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/QmlControls/ScreenTools.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 03c525e48..47adb8dad 100644 --- a/src/QmlControls/ScreenTools.qml +++ b/src/QmlControls/ScreenTools.qml @@ -91,7 +91,8 @@ Item { property real implicitComboBoxHeight: Math.round(defaultFontPixelHeight * (isMobile ? 2.0 : 1.6)) property real implicitComboBoxWidth: Math.round(defaultFontPixelWidth * (isMobile ? 7.0 : 5.0)) property real implicitSliderHeight: isMobile ? Math.max(defaultFontPixelHeight, minTouchPixels) : defaultFontPixelHeight - property real checkBoxIndicatorSize: Math.round(defaultFontPixelHeight * (isMobile ? 1.5 : 1.0)) + // It's not possible to centralize an even number of pixels, checkBoxIndicatorSize should be an odd number to allow centralization + property real checkBoxIndicatorSize: 2 * Math.floor(defaultFontPixelHeight * (isMobile ? 1.5 : 1.0) / 2) + 1 property real radioButtonIndicatorSize: checkBoxIndicatorSize readonly property string normalFontFamily: ScreenToolsController.normalFontFamily -- 2.22.0