[network/kaidan] src/qml: Fix opacity behavior of up/down search buttons in chat
Melvin Keskin <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 2b0b91372e7b4cb0549f7310200abcee5775c0d7 by Melvin Keskin.
Committed on 25/07/2026 at 09:07.
Pushed by melvo into branch 'master'.
Fix opacity behavior of up/down search buttons in chat
The opacity of the buttons now changes according to the search
field's opacity.
A new property is added to Button for disabling its default opacity
behavior.
M +2 -2 src/qml/ChatPage.qml
M +2 -0 src/qml/elements/Button.qml
https://invent.kde.org/network/kaidan/-/commit/2b0b91372e7b4cb0549f7310200abcee5775c0d7
diff --git a/src/qml/ChatPage.qml b/src/qml/ChatPage.qml
index 90c0edb04..5f3145504 100644
--- a/src/qml/ChatPage.qml
+++ b/src/qml/ChatPage.qml
@@ -163,7 +163,7 @@ SearchBarPage {
text: qsTr("Search upwards")
icon.source: "go-up-symbolic"
opacity: root.searchField.opacity
- visible: root.searchField.visible
+ smoothOpacityChangeEnabled: false
onClicked: {
root.searchFromCurrentIndex(true)
root.searchField.forceActiveFocus()
@@ -174,7 +174,7 @@ SearchBarPage {
text: qsTr("Search downwards")
icon.source: "go-down-symbolic"
opacity: root.searchField.opacity
- visible: root.searchField.visible
+ smoothOpacityChangeEnabled: false
onClicked: {
root.searchFromCurrentIndex(false)
root.searchField.forceActiveFocus()
diff --git a/src/qml/elements/Button.qml b/src/qml/elements/Button.qml
index cfa57f22d..1215d8cb7 100644
--- a/src/qml/elements/Button.qml
+++ b/src/qml/elements/Button.qml
@@ -19,6 +19,7 @@ Controls.AbstractButton {
property bool inverted: false
property bool longPressBehaviorEnabled: true
property bool _longPressed: false
+ property alias smoothOpacityChangeEnabled: smoothOpacityChangeBehavior.enabled
hoverEnabled: true
visible: opacity
@@ -59,6 +60,7 @@ Controls.AbstractButton {
}
Behavior on opacity {
+ id: smoothOpacityChangeBehavior
NumberAnimation {}
}
}