Skip to content
Snippets Groups Projects
Verified Commit 82e5fa1b authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix clear button styling

parent 7f6c1136
No related branches found
No related tags found
No related merge requests found
Pipeline #4104 passed
......@@ -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
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment