HomePhabricator

[backport#12173] [Qt] Use flexible font size for QRCode image address

Description

[backport#12173] [Qt] Use flexible font size for QRCode image address

Summary:
Use flexible font size for QRCode image address (Jonas Schnelli)

Pull request description:

Bech32 addresses are currently cut off in the QRCode image in the GUI receive tab.
This adds a simple font size calculation logic that "must" (down to 4pt) fix into the given image width.

Examples OSX HiDPI:
<img width="332" alt="bildschirmfoto 2018-01-12 um 11 25 40" src="https://user-images.githubusercontent.com/178464/34896144-c0c65d76-f78c-11e7-93e1-94dc8e203269.png">
<img width="322" alt="bildschirmfoto 2018-01-12 um 11 25 46" src="https://user-images.githubusercontent.com/178464/34896145-c0edfe1c-f78c-11e7-8c09-c15155e2160e.png">

Examples Ubuntu non HIDPI:
<img width="314" alt="bildschirmfoto 2018-01-12 um 11 27 51" src="https://user-images.githubusercontent.com/178464/34896151-c88347f4-f78c-11e7-8a03-df8049dcfed6.png">
<img width="322" alt="bildschirmfoto 2018-01-12 um 11 27 42" src="https://user-images.githubusercontent.com/178464/34896152-c8bb881c-f78c-11e7-89d2-6f04ec608a19.png">

Backport of Core PR12173

Test Plan:

ninja
bitcoin-qt -regtest, check the receive tab for correctness

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7524

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jan 15 2018, 22:33
majcostaCommitted on Sep 23 2020, 00:08
majcostaPushed on Sep 23 2020, 00:08
Reviewer
Restricted Project
Differential Revision
D7524: [backport#12173] [Qt] Use flexible font size for QRCode image address
Parents
rABC54155de0504f: [backport#16194] refactoring: remove mapBlockIndex global
Branches
Unknown
Tags
Unknown