From: Claudio Cambra Date: Fri, 25 Nov 2022 16:54:17 +0000 (+0100) Subject: Fix BasicComboBox internal layout, take proper account of insets X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~84^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1cf2b59be2cfed9afdde1a68bf6bbb68bc2c792f;p=nextcloud-desktop.git Fix BasicComboBox internal layout, take proper account of insets Signed-off-by: Claudio Cambra --- diff --git a/src/gui/BasicComboBox.qml b/src/gui/BasicComboBox.qml index b844ad1f7..0d5db8f59 100644 --- a/src/gui/BasicComboBox.qml +++ b/src/gui/BasicComboBox.qml @@ -24,7 +24,10 @@ import "./tray" ComboBox { id: clearComboBox - padding: Style.standardSpacing + topPadding: Style.smallSpacing + topInset + leftPadding: Style.smallSpacing + leftInset + rightPadding: Style.smallSpacing + rightInset + bottomPadding: Style.smallSpacing + bottomInset background: Rectangle { radius: Style.slightlyRoundedButtonRadius @@ -33,7 +36,7 @@ ComboBox { } contentItem: EnforcedPlainTextLabel { - leftPadding: 0 + leftPadding: clearComboBox.leftPadding rightPadding: clearComboBox.indicator.width + clearComboBox.spacing text: clearComboBox.displayText @@ -43,8 +46,10 @@ ComboBox { } indicator: ColorOverlay { - x: clearComboBox.width - clearComboBox.rightPadding - y: clearComboBox.topPadding + (clearComboBox.availableHeight - height) / 2 + anchors.right: clearComboBox.right + anchors.rightMargin: clearComboBox.rightPadding + anchors.verticalCenter: clearComboBox.verticalCenter + cached: true color: Style.ncTextColor width: source.width