From 7d4da8952ff50bd38c7b8b7d2e9647f6c74b71a4 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 16 Aug 2019 13:04:54 -0400 Subject: [PATCH] Reduce RoomDelegate opacity for left rooms --- src/qml/SidePane/RoomDelegate.qml | 6 +++++- src/themes/Default.qpl | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index aa1d41ab..3f9deade 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -9,6 +9,9 @@ HInteractiveRectangle { height: rowLayout.height color: theme.sidePane.room.background + opacity: model.left ? theme.sidePane.room.leftRoomOpacity : 1 + Behavior on opacity { HNumberAnimation {} } + TapHandler { onTapped: pageStack.showRoom(userId, model.room_id) } HRowLayout { @@ -47,7 +50,8 @@ HInteractiveRectangle { svgName: "invite-received" visible: Layout.maximumWidth > 0 - Layout.maximumWidth: model.inviter_id ? implicitWidth : 0 + Layout.maximumWidth: + model.inviter_id && ! model.left ? implicitWidth : 0 Behavior on Layout.maximumWidth { HNumberAnimation {} } } diff --git a/src/themes/Default.qpl b/src/themes/Default.qpl index 2dcc3785..bb17766f 100644 --- a/src/themes/Default.qpl +++ b/src/themes/Default.qpl @@ -160,10 +160,12 @@ sidePane: color name: colors.text room: - color background: "transparent" - color name: colors.text - color subtitle: colors.dimText - color lastEventDate: colors.halfDimText + real leftRoomOpacity: 0.65 + + color background: "transparent" + color name: colors.text + color subtitle: colors.dimText + color lastEventDate: colors.halfDimText settingsButton: color background: colors.inputBackground