From 15bda14f0574e3461dc91f4d5917cb0e11f5af07 Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Thu, 8 Sep 2022 10:55:25 +0200 Subject: [PATCH] room-details: Rework navigation and fix listview styles Fixes: https://gitlab.gnome.org/GNOME/fractal/-/issues/900 --- data/resources/resources.gresource.xml | 2 + data/resources/style.css | 14 + data/resources/ui/content-invite-subpage.ui | 21 +- data/resources/ui/content-member-item.ui | 4 +- .../ui/content-member-page-list-view.ui | 32 ++ ...tent-member-page-membership-subpage-row.ui | 27 ++ data/resources/ui/content-member-page.ui | 127 +++--- data/resources/ui/content-room-details.ui | 311 ++++++++------ po/POTFILES.in | 1 + .../room_details/invite_subpage/mod.rs | 5 +- .../members_list_view/extra_lists.rs | 233 ++++++++++ .../member_page/members_list_view/item_row.rs | 121 ++++++ .../{ => members_list_view}/member_row.rs | 34 +- .../membership_subpage_item.rs | 101 +++++ .../membership_subpage_row.rs | 172 ++++++++ .../member_page/members_list_view/mod.rs | 119 +++++ .../content/room_details/member_page/mod.rs | 406 ++++++++++-------- src/session/content/room_details/mod.rs | 214 +++++++-- src/session/content/room_history/mod.rs | 19 +- src/session/room/member.rs | 18 +- 20 files changed, 1531 insertions(+), 450 deletions(-) create mode 100644 data/resources/ui/content-member-page-list-view.ui create mode 100644 data/resources/ui/content-member-page-membership-subpage-row.ui create mode 100644 src/session/content/room_details/member_page/members_list_view/extra_lists.rs create mode 100644 src/session/content/room_details/member_page/members_list_view/item_row.rs rename src/session/content/room_details/member_page/{ => members_list_view}/member_row.rs (82%) create mode 100644 src/session/content/room_details/member_page/members_list_view/membership_subpage_item.rs create mode 100644 src/session/content/room_details/member_page/members_list_view/membership_subpage_row.rs create mode 100644 src/session/content/room_details/member_page/members_list_view/mod.rs diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xml index 2339f435..1f0edb68 100644 --- a/data/resources/resources.gresource.xml +++ b/data/resources/resources.gresource.xml @@ -54,6 +54,8 @@ ui/content-invitee-row.ui ui/content-markdown-popover.ui ui/content-member-item.ui + ui/content-member-page-list-view.ui + ui/content-member-page-membership-subpage-row.ui ui/content-member-page.ui ui/content-member-row.ui ui/content-message-audio.ui diff --git a/data/resources/style.css b/data/resources/style.css index c5727594..9ec71735 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -62,6 +62,9 @@ button.row { border-radius: 12px; } +.round-corners { + border-radius: 6px; +} /* Components */ @@ -545,6 +548,13 @@ message-reactions .reaction-count { font-size: 1.6em; } +.invite-search-results { + padding: 12px 0px; +} + +.invite-search-results > row { + border-radius: 6px; +} /* Room Details */ @@ -552,6 +562,10 @@ message-reactions .reaction-count { margin-bottom: 6px; } +.room-details listview { + background: transparent; +} + .room-details-group avatar * { /* Undo non-sensitive style. */ filter: none; diff --git a/data/resources/ui/content-invite-subpage.ui b/data/resources/ui/content-invite-subpage.ui index 8a0af478..b97a7849 100644 --- a/data/resources/ui/content-invite-subpage.ui +++ b/data/resources/ui/content-invite-subpage.ui @@ -34,10 +34,10 @@ 30 30 6 - true + True - 74 @@ -53,7 +53,7 @@ - true + True left word-char False @@ -80,8 +80,6 @@ - True - True True system-search-symbolic Search for users to invite them to this room. @@ -89,16 +87,12 @@ - True - 24 12 12 - 24 - True True @@ -106,7 +100,7 @@ @@ -116,18 +110,12 @@ - True - True - True system-search-symbolic No users matching the search were found. - True - True - True dialog-error-symbolic An error occurred while searching for matches @@ -137,7 +125,6 @@ True center center - True diff --git a/data/resources/ui/content-member-item.ui b/data/resources/ui/content-member-item.ui index 376d6af5..3e15849d 100644 --- a/data/resources/ui/content-member-item.ui +++ b/data/resources/ui/content-member-item.ui @@ -4,8 +4,8 @@ False False - - + + GtkListItem diff --git a/data/resources/ui/content-member-page-list-view.ui b/data/resources/ui/content-member-page-list-view.ui new file mode 100644 index 00000000..7315ec0c --- /dev/null +++ b/data/resources/ui/content-member-page-list-view.ui @@ -0,0 +1,32 @@ + + + + + diff --git a/data/resources/ui/content-member-page-membership-subpage-row.ui b/data/resources/ui/content-member-page-membership-subpage-row.ui new file mode 100644 index 00000000..ec975dfb --- /dev/null +++ b/data/resources/ui/content-member-page-membership-subpage-row.ui @@ -0,0 +1,27 @@ + + + + + diff --git a/data/resources/ui/content-member-page.ui b/data/resources/ui/content-member-page.ui index 2a1ee02b..9dc23cc7 100644 --- a/data/resources/ui/content-member-page.ui +++ b/data/resources/ui/content-member-page.ui @@ -1,75 +1,79 @@ -