diff --git a/src/QmlControls/QGCRadioButton.qml b/src/QmlControls/QGCRadioButton.qml index 5134be6af7bb48a88c9a833bd29972e8c8e74e02..a4cdc93188524fc0d579797ba4d7b1fa847f55db 100644 --- a/src/QmlControls/QGCRadioButton.qml +++ b/src/QmlControls/QGCRadioButton.qml @@ -24,7 +24,8 @@ RadioButton { y: parent.height / 2 - height / 2 Rectangle { anchors.centerIn: parent - width: Math.round(parent.width * 0.5) + // Width should be an odd number to be centralized by the parent properly + width: 2 * Math.floor(parent.width / 4) + 1 height: width antialiasing: true radius: height * 0.5 diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 03c525e489e5ef5bd01dc094b9362b19fda8cf0f..47adb8dadc655237c1ff62b67774d665c4b0c9ff 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