From e8b173163da311af5789945bbac486b8d6878b96 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 16 Aug 2019 12:55:54 -0400 Subject: [PATCH] Add icon to RoomDelegate for invited rooms --- TODO.md | 1 + src/icons/dark-filled/invite-received.svg | 32 +++++++++++++++++++++++ src/icons/light-thin/invite-received.svg | 32 +++++++++++++++++++++++ src/qml/SidePane/RoomDelegate.qml | 9 ++++++- 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 src/icons/dark-filled/invite-received.svg create mode 100644 src/icons/light-thin/invite-received.svg diff --git a/TODO.md b/TODO.md index 604cb792..e8a5e3db 100644 --- a/TODO.md +++ b/TODO.md @@ -87,6 +87,7 @@ - Spinner when loading account, past room events, images or clicking buttons - Show account page as loading until profile initially retrieved - Theming + - Support SVG hue via image provider for icons - Don't create additional lines in theme conversion (braces) - Recursively merge default and user theme - Distribute fonts diff --git a/src/icons/dark-filled/invite-received.svg b/src/icons/dark-filled/invite-received.svg new file mode 100644 index 00000000..f61967ce --- /dev/null +++ b/src/icons/dark-filled/invite-received.svg @@ -0,0 +1,32 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/src/icons/light-thin/invite-received.svg b/src/icons/light-thin/invite-received.svg new file mode 100644 index 00000000..57217223 --- /dev/null +++ b/src/icons/light-thin/invite-received.svg @@ -0,0 +1,32 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/src/qml/SidePane/RoomDelegate.qml b/src/qml/SidePane/RoomDelegate.qml index 5b16d501..aa1d41ab 100644 --- a/src/qml/SidePane/RoomDelegate.qml +++ b/src/qml/SidePane/RoomDelegate.qml @@ -43,6 +43,14 @@ HInteractiveRectangle { Layout.fillWidth: true } + HIcon { + svgName: "invite-received" + + visible: Layout.maximumWidth > 0 + Layout.maximumWidth: model.inviter_id ? implicitWidth : 0 + Behavior on Layout.maximumWidth { HNumberAnimation {} } + } + HLabel { readonly property var evDate: model.last_event ? model.last_event.date : null @@ -64,7 +72,6 @@ HInteractiveRectangle { Layout.maximumWidth: text && roomDelegate.width >= 200 ? implicitWidth : 0 Behavior on Layout.maximumWidth { HNumberAnimation {} } - } }