From c5d5768f2eabcafeeb5532e25c5ec7de3db4d1fa Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 17 Aug 2019 15:28:20 -0400 Subject: [PATCH] Adjust RoomDelegates opacity when filtering Accounts with no matching rooms to show will have their opacity reduced. --- src/qml/Base/HImage.qml | 11 ++++------- src/qml/SidePane/AccountDelegate.qml | 6 +++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/qml/Base/HImage.qml b/src/qml/Base/HImage.qml index ecb5b186..9c920c09 100644 --- a/src/qml/Base/HImage.qml +++ b/src/qml/Base/HImage.qml @@ -9,12 +9,9 @@ Image { property color colorize: "transparent" - layer { - enabled: ! Qt.colorEqual(colorize, "transparent") - effect: ColorOverlay { - color: image.colorize - cached: image.cache - } + layer.enabled: ! Qt.colorEqual(colorize, "transparent") + layer.effect: ColorOverlay { + color: image.colorize + cached: image.cache } - } diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index 5e9641c6..4ab22675 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -7,6 +7,10 @@ Column { width: parent.width spacing: theme.spacing / 2 + opacity: + paneToolBar.roomFilter && roomList.model.count < 1 ? 0.35 : 1 + Behavior on opacity { HNumberAnimation {} } + property bool expanded: true readonly property var modelItem: model @@ -62,7 +66,7 @@ Column { } RoomList { - id: roomCategoriesList + id: roomList visible: height > 0 width: parent.width height: childrenRect.height * (accountDelegate.expanded ? 1 : 0)