diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-14 22:00:05 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-14 22:01:00 +0100 |
commit | 58f5ba502364014bc7a1d7736b69e73cb5660308 (patch) | |
tree | 1f14b47d60296f56f70b9e366825e324eb681583 /resources/qml | |
parent | Room list: add scrollbar when not collapsed (diff) | |
download | nheko-58f5ba502364014bc7a1d7736b69e73cb5660308.tar.xz |
Make scrollbars optional and disabled by default
Also add them to the communities sidebar
Diffstat (limited to 'resources/qml')
-rw-r--r-- | resources/qml/CommunitiesList.qml | 7 | ||||
-rw-r--r-- | resources/qml/RoomList.qml | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index f9cea1ef..7a2e6ab7 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -36,6 +36,11 @@ Page { height: parent.height model: Communities.filtered() + ScrollBar { + id: scrollbar + } + ScrollBar.vertical: (!collapsed && Settings.scrollbarsInRoomlist) ? scrollbar : null + ScrollHelper { flickable: parent anchors.fill: parent @@ -83,7 +88,7 @@ Page { required property var model height: avatarSize + 2 * Nheko.paddingMedium - width: ListView.view.width + width: ListView.view.width - (scrollbar.interactive && scrollbar.visible ? scrollbar.width : 0) state: "normal" ToolTip.visible: hovered && collapsed ToolTip.text: model.tooltip diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index d51933f9..18afba8b 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -58,13 +58,12 @@ Page { anchors.right: parent.right height: parent.height model: Rooms - reuseItems: true + //reuseItems: true - ScrollBar.vertical: ScrollBar { - id: roomlistscrollbar - active: true - visible: (! collapsed) && (parent.contentHeight > parent.height) + ScrollBar { + id: scrollbar } + ScrollBar.vertical: (!collapsed && Settings.scrollbarsInRoomlist) ? scrollbar : null ScrollHelper { flickable: parent @@ -264,7 +263,7 @@ Page { } height: avatarSize + 2 * Nheko.paddingMedium - width: ListView.view.width - roomlistscrollbar.width + width: ListView.view.width - (scrollbar.interactive && scrollbar.visible ? scrollbar.width : 0) state: "normal" ToolTip.visible: hovered && collapsed ToolTip.delay: Nheko.tooltipDelay |