Commit e376079
committed
Merge #6831: backport: merge bitcoin-core/gui#79, #497 (allow different font for overview page balances)
636e7a6 refactor: remove redundant preview and simplify font handling (UdjinM6)
b59b0f7 feat(qt): add live preview for monospace font in appearance settings (UdjinM6)
83af951 fix: set money font when setting wallet model instead of ctor (Kittywhiskers Van Gogh)
658905b qt: add non-monospace option and use it as default (Kittywhiskers Van Gogh)
e0513ff qt: add horizontal spacer for visual consistency (Kittywhiskers Van Gogh)
e5a8d05 refactor: move monospace font selector to appearance widget (Kittywhiskers Van Gogh)
41c69e9 merge bitcoin-core/gui#497: Enable users to configure their monospace font specifically (Kittywhiskers Van Gogh)
da5804e merge bitcoin-core/gui#79: Embed monospaced font (Kittywhiskers Van Gogh)
eac4f52 qt: adjust padding and font size of monospace font selector (Kittywhiskers Van Gogh)
9c315c3 qt: add monospaced font settings (Kittywhiskers Van Gogh)
34211b6 qt: apply monospace font to overview page balances and CoinJoin elements (Kittywhiskers Van Gogh)
6ed53d6 qt: allow overriding font registry for specific widgets (Kittywhiskers Van Gogh)
800cf66 qt: recognize system monospace font as non-selectable font (Kittywhiskers Van Gogh)
85b49b9 qt: add "Roboto Mono" as non-selectable font (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Depends on #7068
* Depends on #7084
* Dependency for #6833
| [dash#7084](#7084) (8bba1d2) | This PR (636e7a6) |
| ------------------- | ------------------- |
|  |  |
|  |  |
|  |  |
* Based on review suggestions given ([comment](#6831 (comment))), [bitcoin-core/gui#497](bitcoin-core/gui#497) was also backported to allow arbitrary font specification. This also allowed us to offer a "Use existing font" option that _doesn't_ use any monospace font but instead inherits whatever font is used in the rest of the application. This is set as the default ([source](https://github.com/kwvg/dash/blob/89aa2c4b2390ada504fd5b45e16d2cd379074138/src/qt/optionsmodel.cpp#L73)), rendering monospace balance counters opt-in.
* Unlike Bitcoin, Dash has a dedicated appearance widget for managing font settings specifically. We have opted to deviate from upstream by moving the money font control from "Display" to "Appearance" for the sake of consistency.
* We set the money font when setting the wallet model as client model updates happen after the UI is visible to the user while wallet model updates happen _before_, there is little point in setting them to any values in the constructor as during construction, we don't have access to the options model and thus don't know _what_ font is supposed to be used to begin with.
* If a font is passed through the command line, it is considered "selectable" ([source](https://github.com/kwvg/dash/blob/89aa2c4b2390ada504fd5b45e16d2cd379074138/src/qt/bitcoin.cpp#L676-L679)) because we still need to populate that font in the drop-down menu so that we don't report stale data. Though, the font cannot be _set_ to that overridden value because command-line overridden controls are auto-disabled to prevent settings corruption (see 2f30002), which makes the "selectable" state more-or-less an internal detail.
An example is that the user tries to run Dash Core, the embedded monospace font, Roboto Mono, is _not_ a selectable font (i.e. you cannot ordinarily set your client to use Roboto Mono, see below).
<details>
<summary>Screenshot:</summary>

</details>
But if an override is done, it will be respected, the client will start with Roboto Mono and the selectable status will be overwritten so that it is presented in the drop-down menu, albeit, with the menu disabled so it doesn't contaminate UI settings.
<details>
<summary>Screenshot:</summary>

</details>
## Breaking Changes
None expected.
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
- [x] I have made corresponding changes to the documentation **(note: N/A)**
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
ACK 636e7a6
Tree-SHA512: a8b23c14aec0ccac126bdc7a6db0a4583da3bda52e02f72d213431bbaa80c633a432ed02c4a33d71e3e4d2503d076624196c3e6e50c9bb7fd8e3b50ae4e9ec35File tree
12 files changed
+372
-62
lines changed- src/qt
- forms
12 files changed
+372
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
21 | 75 | | |
22 | 76 | | |
23 | 77 | | |
| |||
34 | 88 | | |
35 | 89 | | |
36 | 90 | | |
37 | | - | |
| 91 | + | |
| 92 | + | |
38 | 93 | | |
39 | 94 | | |
40 | 95 | | |
| |||
43 | 98 | | |
44 | 99 | | |
45 | 100 | | |
46 | | - | |
| 101 | + | |
| 102 | + | |
47 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
48 | 107 | | |
49 | | - | |
| 108 | + | |
| 109 | + | |
50 | 110 | | |
51 | 111 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 112 | | |
56 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
57 | 120 | | |
58 | 121 | | |
59 | 122 | | |
| |||
78 | 141 | | |
79 | 142 | | |
80 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
81 | 151 | | |
82 | 152 | | |
83 | 153 | | |
| |||
103 | 173 | | |
104 | 174 | | |
105 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
106 | 180 | | |
107 | 181 | | |
108 | 182 | | |
| |||
138 | 212 | | |
139 | 213 | | |
140 | 214 | | |
| 215 | + | |
141 | 216 | | |
142 | 217 | | |
143 | 218 | | |
| |||
154 | 229 | | |
155 | 230 | | |
156 | 231 | | |
157 | | - | |
| 232 | + | |
158 | 233 | | |
159 | 234 | | |
160 | 235 | | |
| |||
193 | 268 | | |
194 | 269 | | |
195 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
196 | 284 | | |
197 | 285 | | |
198 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
| 492 | + | |
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
482 | 525 | | |
483 | 526 | | |
484 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 233 | | |
242 | 234 | | |
243 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
| |||
0 commit comments