summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-01-07 03:43:32 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-01-07 03:43:39 +0100
commit82e5fa1b45f90aed770ac153b8c10a7d0a7613c9 (patch)
tree44a0c549899547799cdac1310522234f3104b7b5
parent7f6c1136ffc08b973e82d19abc6bbe4b6b3b4431 (diff)
Fix clear button styling
-rw-r--r--resources/qml/MatrixTextField.qml27
1 files changed, 7 insertions, 20 deletions
diff --git a/resources/qml/MatrixTextField.qml b/resources/qml/MatrixTextField.qml
index 5ebc9728..a40c6bad 100644
--- a/resources/qml/MatrixTextField.qml
+++ b/resources/qml/MatrixTextField.qml
@@ -131,37 +131,24 @@ ColumnLayout {
color: labelC.text ? "transparent" : backgroundColor
}
- ToolButton {
+ ImageButton {
id: clearText
- Layout.fillWidth: true
+
visible: c.hasClear && searchField.text !== ''
- icon.source: "image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearText.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
+
+ image: ":/icons/icons/ui/round-remove-button.svg"
focusPolicy: Qt.NoFocus
onClicked: {
searchField.clear()
topBar.searchString = "";
}
hoverEnabled: true
- background: null
anchors {
- verticalCenter: parent.verticalCenter
+ top: parent.top
+ bottom: parent.bottom
right: parent.right
+ rightMargin: Nheko.paddingSmall
}
- // clear the default hover effects.
-
- Image {
- height: parent.height - 2 * Nheko.paddingSmall
- width: height
- source: "image://colorimage/:/icons/icons/ui/round-remove-button.svg?" + (clearText.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
-
- anchors {
- verticalCenter: parent.verticalCenter
- right: parent.right
- margins: Nheko.paddingSmall
- }
-
- }
-
}
}