mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:18:39 +00:00
Add Header Control #100
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!100
Loading…
Reference in a new issue
No description provided.
Delete branch "headertext-control"
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?
This introduces and demos the
Headercontrol. This component is to be used as the main text component for wizard pages; it implements the style for wizard text set in the main design file. It's properties allows for a good level of customization, so this can be extended to any page (wizard or not) that needs a header.The
headercontrol consists of a required header text, and optional description and subtext strings. This allows the control to be reused for all currently designed wizard pages. The description label will only be shown if thedescriptionproperty is given a value. Similarly, the subtext label will only be shown if thesubtextproperty is given a value.The
bold,headerSize,descriptionSize,descriptionMarginandsubtextSizeproperties have been given default values that represent the most common sizes in our wizard pages. Looking at the designed wizard pages; All headers have a size of 28 except the first one. Also, only one header is bold. Therefore, theboldproperty has been given a default value of false andheaderSizea default value of 28. Similarly, all descriptions have a size of 18 and a margin of 10 except the first one; set 18 as default value fordescriptionSizeand 10 as default value fordescriptionMargin. There is only one page with subtext, and it sets the size for the subtext to 15; set the default value forsubtextSizeto 15.This means that the code to represent header text can be condensed. For example, the following code represents the header text for the onboarding connections page:
The diagram below shows a breakdown of the control and how it works/example usage:
updates from 2fb2611 -> 827abff (pr100.01 -> pr100.02, diff)
changes:
centerproperty. This property defaults to true. This will allow this control to be used as the main text for the connections detailed settings page.Tested ACK, but should address the following comments.
This should be
Controland below setcontentItem: ColumnLayout {.Can be removed after previous comment.
Same as above.
This doesn't make sense,
sourceComponent.heightis not the actual label height. I think you can just drop this line.Should handle
description === undefined?Should bind
visible: activeotherwiseColumnLayoutwill add the spacing (currently it is 0, maybe because of this?)Same below.
Use
root.center.It needs to be rebased. And then module versions should be
x.15.https://bitcoindesign.slack.com/archives/C026F9QF79B/p1641383578276800?thread_ts=1641381552.272700&cid=C026F9QF79B:
updated from 827abff ->
6aee4e3rebased and addressed review comments. Here is a diff of the changes on Header.qml:
we'll keep this in mind, but for now leave as is?
done
done
undefined wouldn't have a length greater than zero, so isn't this fine as is?
done :D
Accessing length of undefined is an error?
Agree, not the place to address this.
Code review ACK
6aee4e3042.This could be
required property string header.