Bugfix/12746 Node management window is not scrollable#19503
Bugfix/12746 Node management window is not scrollable#19503mmlado wants to merge 2 commits intostatus-im:masterfrom
Conversation
| height: 300 | ||
| Layout.fillWidth: true | ||
| Layout.fillHeight: true | ||
| Layout.preferredHeight: 0 |
There was a problem hiding this comment.
Why the preferredHeight: 0, fillHeight: true should already do the thing right?
There was a problem hiding this comment.
When multiple items have fillHeight: true QML uses secondary, implicit, parameter for it's height, which by default is based on the based on it's contents, so Logs, as it has the most content, will take up disproportional amount of space compared to the other two sections. With preferredHeight: 0 it's telling it to ignore the natural size preference and to only fill the available space evenly as all the sections have the same preferences for their size.
There was a problem hiding this comment.
Ah right; these days you could use the new https://doc.qt.io/qt-6/qml-qtquick-layouts-layout.html#verticalStretchFactor-attached-prop
What does the PR do
In Node management the fields Mailserver interactions, Logs, and JSON-RPC will resize to the available space in the window, keeping roughly 1/3 of the space for themselves.
Fixes #12746
Affected areas
Node management
Architecture compliance
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
Impact on end user
Before: If the window was small, the user didn't see all the fields
After: If the window is small, the fields will shrink/grow to the available space in the window.
How to test
Risk
Cosmetic changes. Minimal risk.