Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cfb50c6d
Unverified
Commit
cfb50c6d
authored
May 20, 2019
by
Gus Grubba
Committed by
GitHub
May 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7457 from patrickelectric/combobox
Fix CheckBox centralization
parents
fce935ff
9c5aa524
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
QGCRadioButton.qml
src/QmlControls/QGCRadioButton.qml
+2
-1
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+2
-1
No files found.
src/QmlControls/QGCRadioButton.qml
View file @
cfb50c6d
...
...
@@ -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
...
...
src/QmlControls/ScreenTools.qml
View file @
cfb50c6d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment