mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:18:39 +00:00
Fix options switch alignment within settings #161
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!161
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-option-switch-alignment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes alignment of the option switch within a settings row.
Closes bitcoin-core/gui-qml#159
cc @GBKS
That looks correctly centered now. Is this automatic centering or by setting pixel coordinates (or top padding)? If it's the latter, then it may not be centered anymore if the content on the left changes (like a translation being longer).
@GBKS the centering is automatic, it's handled by the RowLayout. This change constrains the OptionSwitch to only the space needed for it's visual elements instead of having padding all around.
See comparison below where i gave the control a background:
root.width==indicator.implicitWidth-- is it coincidence? If not, why a constant is duplicated?updated from 250bb9f to 5af9c73
changes: set indicators implicitWidth/height to parent width/height
ACK modulo nit
Here's a screenshot I took on Ubuntu 22.04 with Qt version 5.15.3
Screenshot:
nit:
updated from 5af9c73 to e6f8728 (pr161.01 -> pr161.02, Compare)
Changes: addressed spacing nit
done
https://github.com/bitcoin-core/gui-qml/pull/169#pullrequestreview-1101569629: