diff --git a/src/gui/MainPane/AccountBar.qml b/src/gui/MainPane/AccountBar.qml index 98a9b395..55cc9704 100644 --- a/src/gui/MainPane/AccountBar.qml +++ b/src/gui/MainPane/AccountBar.qml @@ -57,6 +57,13 @@ Rectangle { // compact: tile.compact radius: theme.mainPane.accountBar.account.avatarRadius + + opacity: + tile.collapsed ? + theme.mainPane.accountBar.account.collapsedOpacity : + 1 + + Behavior on opacity { HNumberAnimation {} } } MessageIndicator { @@ -94,6 +101,10 @@ Rectangle { contextMenu: AccountContextMenu { userId: model.id } onLeftClicked: roomList.goToAccount(model.id) + + readonly property bool collapsed: + (window.uiState.collapseAccounts[model.id] || false) && + ! roomList.filter } highlight: Item { diff --git a/src/themes/Midnight.qpl b/src/themes/Midnight.qpl index cd64a91b..a711446f 100644 --- a/src/themes/Midnight.qpl +++ b/src/themes/Midnight.qpl @@ -283,13 +283,14 @@ mainPane: color background: colors.mediumBackground account: - color background: "transparent" - int avatarRadius: controls.avatar.radius + real collapsedOpacity: 0.3 + color background: "transparent" + int avatarRadius: controls.avatar.radius - color selectedBackground: colors.accentBackground + color selectedBackground: colors.accentBackground real selectedBackgroundOpacity: 0.3 - color selectedBorder: colors.strongAccentElement - int selectedBorderSize: 2 + color selectedBorder: colors.strongAccentElement + int selectedBorderSize: 2 unreadIndicator: color background: colors.accentBackground