Persist sidebar sizes
2 files changed, 21 insertions, 4 deletions
diff --git a/resources/icons/ui/user-friends-solid.svg b/resources/icons/ui/user-friends-solid.svg
new file mode 100644
index 00000000..1add45ec
--- /dev/null
+++ b/resources/icons/ui/user-friends-solid.svg
@@ -0,0 +1 @@
+<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="user-friends" class="svg-inline--fa fa-user-friends fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M192 256c61.9 0 112-50.1 112-112S253.9 32 192 32 80 82.1 80 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C51.6 288 0 339.6 0 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zM480 256c53 0 96-43 96-96s-43-96-96-96-96 43-96 96 43 96 96 96zm48 32h-3.8c-13.9 4.8-28.6 8-44.2 8s-30.3-3.2-44.2-8H432c-20.4 0-39.2 5.9-55.7 15.4 24.4 26.3 39.7 61.2 39.7 99.8v38.4c0 2.2-.5 4.3-.6 6.4H592c26.5 0 48-21.5 48-48 0-61.9-50.1-112-112-112z"></path></svg>
\ No newline at end of file
diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml
index 85ae81e8..1e03ef11 100644
--- a/resources/qml/ChatPage.qml
+++ b/resources/qml/ChatPage.qml
@@ -25,7 +25,7 @@ Rectangle {
minimumWidth: communitiesList.avatarSize * 4 + Nheko.paddingMedium * 2
collapsedWidth: communitiesList.avatarSize + 2 * Nheko.paddingMedium
- preferredWidth: collapsedWidth
+ preferredWidth: Settings.communityListWidth >= minimumWidth ? Settings.communityListWidth : collapsedWidth
maximumWidth: communitiesList.avatarSize * 10 + 2 * Nheko.paddingMedium
CommunitiesList {
@@ -34,14 +34,22 @@ Rectangle {
collapsed: parent.collapsed
}
+ Binding {
+ target: Settings
+ property: 'communityListWidth'
+ value: communityListC.preferredWidth
+ when: !adaptiveView.singlePageMode
+ delayed: true
+ }
+
}
AdaptiveLayoutElement {
id: roomListC
- minimumWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
- preferredWidth: Nheko.avatarSize * 5 + Nheko.paddingSmall * 2
- maximumWidth: Nheko.avatarSize * 10 + Nheko.paddingSmall * 2
+ minimumWidth: roomlist.avatarSize * 4 + Nheko.paddingSmall * 2
+ preferredWidth: Settings.roomListWidth >= minimumWidth ? Settings.roomListWidth : roomlist.avatarSize * 5 + Nheko.paddingSmall * 2
+ maximumWidth: roomlist.avatarSize * 10 + Nheko.paddingSmall * 2
collapsedWidth: roomlist.avatarSize + 2 * Nheko.paddingMedium
RoomList {
@@ -50,6 +58,14 @@ Rectangle {
collapsed: parent.collapsed
}
+ Binding {
+ target: Settings
+ property: 'roomListWidth'
+ value: roomListC.preferredWidth
+ when: !adaptiveView.singlePageMode
+ delayed: true
+ }
+
}
AdaptiveLayoutElement {
|