Commit 62428fa1 authored by Wescoeur's avatar Wescoeur

fix(ui/modules/Common/Form/ComboBox): add a left margin (qt 5.9)

parent ca1f4a44
...@@ -33,27 +33,36 @@ ComboBox { ...@@ -33,27 +33,36 @@ ComboBox {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
contentItem: RowLayout { contentItem: Item {
spacing: ComboBoxStyle.contentItem.spacing height: comboBox.height
width: comboBox.width width: comboBox.width
Icon { RowLayout {
icon: Logic.getSelectedEntryIcon() anchors {
iconSize: ComboBoxStyle.contentItem.iconSize fill: parent
leftMargin: ComboBoxStyle.contentItem.leftMargin
}
visible: icon.length > 0 spacing: ComboBoxStyle.contentItem.spacing
}
Text { Icon {
Layout.fillWidth: true icon: Logic.getSelectedEntryIcon()
iconSize: ComboBoxStyle.contentItem.iconSize
color: ComboBoxStyle.contentItem.text.color visible: icon.length > 0
elide: Text.ElideRight }
font.pointSize: ComboBoxStyle.contentItem.text.pointSize Text {
rightPadding: comboBox.indicator.width + comboBox.spacing Layout.fillWidth: true
color: ComboBoxStyle.contentItem.text.color
elide: Text.ElideRight
text: Logic.getSelectedEntryText() font.pointSize: ComboBoxStyle.contentItem.text.pointSize
rightPadding: comboBox.indicator.width + comboBox.spacing
text: Logic.getSelectedEntryText()
}
} }
} }
......
...@@ -22,6 +22,7 @@ QtObject { ...@@ -22,6 +22,7 @@ QtObject {
property QtObject contentItem: QtObject { property QtObject contentItem: QtObject {
property int iconSize: 20 property int iconSize: 20
property int leftMargin: 10
property int spacing: 5 property int spacing: 5
property QtObject text: QtObject { property QtObject text: QtObject {
......
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