mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-26 08:18:08 +00:00
fix(ui/modules/Common/Form/ComboBox): add a left margin (qt 5.9)
This commit is contained in:
parent
ca1f4a44fc
commit
62428fa155
2 changed files with 24 additions and 14 deletions
|
|
@ -33,27 +33,36 @@ ComboBox {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
contentItem: RowLayout {
|
||||
spacing: ComboBoxStyle.contentItem.spacing
|
||||
contentItem: Item {
|
||||
height: comboBox.height
|
||||
width: comboBox.width
|
||||
|
||||
Icon {
|
||||
icon: Logic.getSelectedEntryIcon()
|
||||
iconSize: ComboBoxStyle.contentItem.iconSize
|
||||
RowLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: ComboBoxStyle.contentItem.leftMargin
|
||||
}
|
||||
|
||||
visible: icon.length > 0
|
||||
}
|
||||
spacing: ComboBoxStyle.contentItem.spacing
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Icon {
|
||||
icon: Logic.getSelectedEntryIcon()
|
||||
iconSize: ComboBoxStyle.contentItem.iconSize
|
||||
|
||||
color: ComboBoxStyle.contentItem.text.color
|
||||
elide: Text.ElideRight
|
||||
visible: icon.length > 0
|
||||
}
|
||||
|
||||
font.pointSize: ComboBoxStyle.contentItem.text.pointSize
|
||||
rightPadding: comboBox.indicator.width + comboBox.spacing
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: Logic.getSelectedEntryText()
|
||||
color: ComboBoxStyle.contentItem.text.color
|
||||
elide: Text.ElideRight
|
||||
|
||||
font.pointSize: ComboBoxStyle.contentItem.text.pointSize
|
||||
rightPadding: comboBox.indicator.width + comboBox.spacing
|
||||
|
||||
text: Logic.getSelectedEntryText()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ QtObject {
|
|||
|
||||
property QtObject contentItem: QtObject {
|
||||
property int iconSize: 20
|
||||
property int leftMargin: 10
|
||||
property int spacing: 5
|
||||
|
||||
property QtObject text: QtObject {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue