Adjust RoomDelegates opacity when filtering

Accounts with no matching rooms to show will have their opacity reduced.
This commit is contained in:
miruka 2019-08-17 15:28:20 -04:00
parent ec17e36911
commit c5d5768f2e
2 changed files with 9 additions and 8 deletions

View File

@ -9,12 +9,9 @@ Image {
property color colorize: "transparent" property color colorize: "transparent"
layer { layer.enabled: ! Qt.colorEqual(colorize, "transparent")
enabled: ! Qt.colorEqual(colorize, "transparent") layer.effect: ColorOverlay {
effect: ColorOverlay {
color: image.colorize color: image.colorize
cached: image.cache cached: image.cache
} }
} }
}

View File

@ -7,6 +7,10 @@ Column {
width: parent.width width: parent.width
spacing: theme.spacing / 2 spacing: theme.spacing / 2
opacity:
paneToolBar.roomFilter && roomList.model.count < 1 ? 0.35 : 1
Behavior on opacity { HNumberAnimation {} }
property bool expanded: true property bool expanded: true
readonly property var modelItem: model readonly property var modelItem: model
@ -62,7 +66,7 @@ Column {
} }
RoomList { RoomList {
id: roomCategoriesList id: roomList
visible: height > 0 visible: height > 0
width: parent.width width: parent.width
height: childrenRect.height * (accountDelegate.expanded ? 1 : 0) height: childrenRect.height * (accountDelegate.expanded ? 1 : 0)