Simplify spacedrawer width code

This commit is contained in:
Tobias Fella
2024-03-27 21:09:27 +01:00
parent b48c1c3b80
commit bae14ecd35

View File

@@ -25,8 +25,7 @@ Kirigami.Page {
* @note Other objects can access the value but the private function makes sure * @note Other objects can access the value but the private function makes sure
* that only the internal members can modify it. * that only the internal members can modify it.
*/ */
readonly property int currentWidth: _private.currentWidth + spaceListWidth + 1 readonly property int currentWidth: _private.currentWidth + spaceDrawer.width + 1
readonly property alias spaceListWidth: spaceDrawer.width
required property NeoChatConnection connection required property NeoChatConnection connection
@@ -94,7 +93,7 @@ Kirigami.Page {
SpaceDrawer { SpaceDrawer {
id: spaceDrawer id: spaceDrawer
Layout.preferredWidth: spaceDrawer.enabled ? Kirigami.Units.gridUnit * 3 : 0 Layout.preferredWidth: Kirigami.Units.gridUnit * 3
Layout.fillHeight: true Layout.fillHeight: true
connection: root.connection connection: root.connection