mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Fix clear button styling
This commit is contained in:
parent
7f6c1136ff
commit
82e5fa1b45
1 changed files with 7 additions and 20 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue