Unverified Commit cfb50c6d authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #7457 from patrickelectric/combobox

Fix CheckBox centralization 
parents fce935ff 9c5aa524
...@@ -24,7 +24,8 @@ RadioButton { ...@@ -24,7 +24,8 @@ RadioButton {
y: parent.height / 2 - height / 2 y: parent.height / 2 - height / 2
Rectangle { Rectangle {
anchors.centerIn: parent 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 height: width
antialiasing: true antialiasing: true
radius: height * 0.5 radius: height * 0.5
......
...@@ -91,7 +91,8 @@ Item { ...@@ -91,7 +91,8 @@ Item {
property real implicitComboBoxHeight: Math.round(defaultFontPixelHeight * (isMobile ? 2.0 : 1.6)) property real implicitComboBoxHeight: Math.round(defaultFontPixelHeight * (isMobile ? 2.0 : 1.6))
property real implicitComboBoxWidth: Math.round(defaultFontPixelWidth * (isMobile ? 7.0 : 5.0)) property real implicitComboBoxWidth: Math.round(defaultFontPixelWidth * (isMobile ? 7.0 : 5.0))
property real implicitSliderHeight: isMobile ? Math.max(defaultFontPixelHeight, minTouchPixels) : defaultFontPixelHeight 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 property real radioButtonIndicatorSize: checkBoxIndicatorSize
readonly property string normalFontFamily: ScreenToolsController.normalFontFamily readonly property string normalFontFamily: ScreenToolsController.normalFontFamily
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment