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
12c58934
Unverified
Commit
12c58934
authored
Nov 13, 2019
by
Don Gagne
Committed by
GitHub
Nov 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8028 from DonLakeFlyer/QGCComboBox
Tweak combobox visuals
parents
ac8a932f
15c2e148
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
QGCComboBox.qml
src/QmlControls/QGCComboBox.qml
+11
-11
ScreenTools.qml
src/QmlControls/ScreenTools.qml
+1
-1
No files found.
src/QmlControls/QGCComboBox.qml
View file @
12c58934
...
...
@@ -15,16 +15,16 @@ import QtQuick.Templates 2.4 as T
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
T.ComboBox
{
id
:
control
padding
:
ScreenTools
.
comboBoxPadding
spacing
:
ScreenTools
.
defaultFontPixelWidth
implicitWidth
:
Math
.
max
(
background
?
background
.
implicitWidth
:
0
,
contentItem
.
implicitWidth
+
leftPadding
+
rightP
adding
)
contentItem
.
implicitWidth
+
leftPadding
+
rightPadding
+
p
adding
)
implicitHeight
:
Math
.
max
(
background
?
background
.
implicitHeight
:
0
,
Math
.
max
(
contentItem
.
implicitHeight
,
indicator
?
indicator
.
implicitHeight
:
0
)
+
topPadding
+
bottomPadding
)
Math
.
max
(
contentItem
.
implicitHeight
,
indicator
?
indicator
.
implicitHeight
:
0
)
+
topPadding
+
bottomPadding
)
leftPadding
:
padding
+
(
!
control
.
mirrored
||
!
indicator
||
!
indicator
.
visible
?
0
:
indicator
.
width
+
spacing
)
rightPadding
:
padding
+
(
control
.
mirrored
||
!
indicator
||
!
indicator
.
visible
?
0
:
indicator
.
width
)
...
...
@@ -76,14 +76,14 @@ T.ComboBox {
highlighted
:
control
.
highlightedIndex
===
index
}
// Dropdown indicator
indicator
:
ColorImage
{
x
:
control
.
mirrored
?
control
.
padding
:
control
.
width
-
width
y
:
control
.
topPadding
+
(
control
.
availableHeight
-
height
)
/
2
color
:
_qgcPal
.
text
defaultColor
:
"
#353637
"
source
:
"
qrc:/qt-project.org/imports/QtQuick/Controls.2/images/double-arrow
.png
"
opacity
:
enabled
?
1
:
0.3
indicator
:
QGCColoredImage
{
anchors.rightMargin
:
control
.
padding
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
height
:
ScreenTools
.
defaultFontPixelWidth
width
:
height
source
:
"
/qmlimages/arrow-down
.png
"
color
:
_qgcPal
.
text
}
// The label of the button
...
...
src/QmlControls/ScreenTools.qml
View file @
12c58934
...
...
@@ -90,7 +90,7 @@ Item {
property
real
implicitTextFieldHeight
:
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
comboBoxPadding
:
Math
.
round
(
defaultFontPixelWidth
*
(
isShortScreen
?
1
:
0.5
))
property
real
comboBoxPadding
:
defaultFontPixelWidth
property
real
implicitSliderHeight
:
isMobile
?
Math
.
max
(
defaultFontPixelHeight
,
minTouchPixels
)
:
defaultFontPixelHeight
// 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
...
...
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