-
Notifications
You must be signed in to change notification settings - Fork 90
Bugfix/12746 Node management window is not scrollable #19503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bugfix/12746 Node management window is not scrollable #19503
Conversation
caybro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good 👍
| height: 300 | ||
| Layout.fillWidth: true | ||
| Layout.fillHeight: true | ||
| Layout.preferredHeight: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the preferredHeight: 0, fillHeight: true should already do the thing right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right; these days you could use the new https://doc.qt.io/qt-6/qml-qtquick-layouts-layout.html#verticalStretchFactor-attached-prop
caybro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
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.