|
|
@ -131,37 +131,24 @@ ColumnLayout { |
|
|
|
color: labelC.text ? "transparent" : backgroundColor |
|
|
|
color: labelC.text ? "transparent" : backgroundColor |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ToolButton { |
|
|
|
ImageButton { |
|
|
|
id: clearText |
|
|
|
id: clearText |
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
visible: c.hasClear && searchField.text !== '' |
|
|
|
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 |
|
|
|
focusPolicy: Qt.NoFocus |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
searchField.clear() |
|
|
|
searchField.clear() |
|
|
|
topBar.searchString = ""; |
|
|
|
topBar.searchString = ""; |
|
|
|
} |
|
|
|
} |
|
|
|
hoverEnabled: true |
|
|
|
hoverEnabled: true |
|
|
|
background: null |
|
|
|
|
|
|
|
anchors { |
|
|
|
anchors { |
|
|
|
verticalCenter: parent.verticalCenter |
|
|
|
top: parent.top |
|
|
|
|
|
|
|
bottom: parent.bottom |
|
|
|
right: parent.right |
|
|
|
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 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|