pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls import "../theme" ComboBox { id: root implicitWidth: 180 implicitHeight: 38 leftPadding: 12 rightPadding: 30 background: Rectangle { radius: 10 color: root.hovered ? Theme.hover : Theme.surfaceVariant border.color: root.activeFocus ? Theme.accent : Theme.border } contentItem: Text { text: root.displayText color: Theme.text verticalAlignment: Text.AlignVCenter elide: Text.ElideRight font: root.font } indicator: Text { text: "⌄" color: Theme.textSecondary anchors.right: parent.right anchors.rightMargin: 12 anchors.verticalCenter: parent.verticalCenter } delegate: ItemDelegate { id: entry required property var modelData required property int index width: root.width - 16 highlighted: root.highlightedIndex === index contentItem: Text { text: root.textRole ? entry.modelData[root.textRole] : entry.modelData color: Theme.text elide: Text.ElideRight font: root.font } background: Rectangle { radius: 8 color: entry.highlighted ? Qt.alpha(Theme.accent, 0.2) : Theme.transparent } } popup: Popup { y: root.height + 6 // Stay inside the window: panel-sized layer surfaces clip anything outside. margins: 6 width: root.width padding: 8 implicitHeight: Math.min(contentItem.implicitHeight + 16, 300) contentItem: ListView { clip: true implicitHeight: contentHeight model: root.popup.visible ? root.delegateModel : null currentIndex: root.highlightedIndex ScrollIndicator.vertical: ScrollIndicator {} } background: GlassPanel { surfaceOpacity: Math.max(Theme.panelOpacity, 0.85) } } }