diff options
| -rw-r--r-- | desktop/Settings.qml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/desktop/Settings.qml b/desktop/Settings.qml index 9882193..2e6d1f1 100644 --- a/desktop/Settings.qml +++ b/desktop/Settings.qml @@ -106,7 +106,7 @@ Scope { TextInput { id: searchIn - anchors { fill: parent; leftMargin: 10; rightMargin: 10 } + anchors { fill: parent; leftMargin: 10; rightMargin: 30 } verticalAlignment: TextInput.AlignVCenter clip: true selectByMouse: true @@ -127,6 +127,24 @@ Scope { font: parent.font } } + + // Clear, there only while something is typed. + Text { + anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter } + visible: root.query !== "" + // nf-fa-xmark, present in Inconsolata Nerd Font. + text: "" + font { family: Theme.iconFamily; pixelSize: Theme.fontSize - 2 } + color: clearArea.containsMouse ? Theme.text : Theme.subtext + + MouseArea { + id: clearArea + anchors { fill: parent; margins: -6 } + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: { root.query = ""; searchIn.forceActiveFocus(); } + } + } } ListView { |
