From 652e00ea15db761520c09d961157acc367e10c32 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Sun, 23 Apr 2023 08:04:27 -0400 Subject: [PATCH] Hardcode the color/style for combobox popup. --- main.qml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/main.qml b/main.qml index aedb3b63..51ad6371 100644 --- a/main.qml +++ b/main.qml @@ -67,6 +67,39 @@ Window { horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight } + delegate: ItemDelegate { + width: comboBox.width + contentItem: Text { + text: modelData + color: "#d1d5db" + font: control.font + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + background: Rectangle { + color: highlighted ? "#343541" : "#242528" + } + highlighted: comboBox.highlightedIndex === index + } + popup: Popup { + y: comboBox.height - 1 + width: comboBox.width + implicitHeight: contentItem.implicitHeight + padding: 0 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: comboBox.popup.visible ? comboBox.delegateModel : null + currentIndex: comboBox.highlightedIndex + ScrollIndicator.vertical: ScrollIndicator { } + } + + background: Rectangle { + color: "#242528" + } + } + background: Rectangle { color: "#242528" }