From e45055f48c5f2ed33e0b7ed984312c2777a47f07 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 28 Feb 2021 16:41:19 -0400 Subject: [PATCH] Indicate when combo box accepts custom input --- docs/TODO.md | 1 - src/gui/Base/HComboBox.qml | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/TODO.md b/docs/TODO.md index 32cf3a2d..79168d00 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -3,7 +3,6 @@ - sfx selection - custom action -- combo box custom item - fix flickable popups can't be flicked by keyboard - seen tooltips can't be shown on image hover diff --git a/src/gui/Base/HComboBox.qml b/src/gui/Base/HComboBox.qml index 2a55b976..4bc096aa 100644 --- a/src/gui/Base/HComboBox.qml +++ b/src/gui/Base/HComboBox.qml @@ -76,6 +76,19 @@ ComboBox { } } + HLabel { + visible: root.editable + height: visible ? implicitHeight : 0 + text: qsTr("Custom input accepted") + color: theme.colors.dimText + leftPadding: theme.spacing + rightPadding: leftPadding + topPadding: theme.spacing / 1.75 + bottomPadding: topPadding + width: menu.width + wrapMode: HLabel.Wrap + } + Repeater { model: root.popup.visible ? root.model : null delegate: root.delegate