Commit 3ebe6b4d authored by DonLakeFlyer's avatar DonLakeFlyer

Add centeredLabel support

parent 11371d99
...@@ -9,6 +9,7 @@ Button { ...@@ -9,6 +9,7 @@ Button {
id: combo id: combo
property real pointSize: ScreenTools.defaultFontPointSize ///< Point size for button text property real pointSize: ScreenTools.defaultFontPointSize ///< Point size for button text
property bool centeredLabel: false
property alias model: popupItems.model property alias model: popupItems.model
property alias textRole: popup.textRole property alias textRole: popup.textRole
property alias currentIndex: popup.__selectedIndex property alias currentIndex: popup.__selectedIndex
...@@ -62,8 +63,10 @@ Button { ...@@ -62,8 +63,10 @@ Button {
QGCLabel { QGCLabel {
id: text id: text
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: centeredLabel ? parent.horizontalCenter : undefined
text: control.currentText text: control.currentText
color: control._qgcPal.buttonText color: control._qgcPal.buttonText
font.pointSize: pointSize
} }
} }
} }
......
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