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"
layer {
enabled: ! Qt.colorEqual(colorize, "transparent")
effect: ColorOverlay {
layer.enabled: ! Qt.colorEqual(colorize, "transparent")
layer.effect: ColorOverlay {
color: image.colorize
cached: image.cache
}
}
}

View File

@ -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)