aboutsummaryrefslogtreecommitdiff
path: root/src/qt/utilitydialog.cpp
diff options
context:
space:
mode:
authorPatrick Lodder <[email protected]>2021-03-20 01:35:00 +0100
committerPatrick Lodder <[email protected]>2021-03-20 01:35:00 +0100
commitdfb78d26dc38cf86783ec0161408c593556337d6 (patch)
treecc8c7ab2b7161cd7d1ed5794cd51f72ed0794f74 /src/qt/utilitydialog.cpp
parentMerge pull request #1788 from patricklodder/1.14-fix-rpc-null-responses (diff)
downloaddiscoin-dfb78d26dc38cf86783ec0161408c593556337d6.tar.xz
discoin-dfb78d26dc38cf86783ec0161408c593556337d6.zip
[bugfix] fix text overflow on paper wallet
- use Courier instead of "monospace" as font family as the latter does not translate to an actual monospace font properly - make address and privkey fields to have equal dimensions and margins, because their fontsizes are calculated uniformly too - make the max font size 98% of the wallet, instead of 99%
Diffstat (limited to 'src/qt/utilitydialog.cpp')
-rw-r--r--src/qt/utilitydialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index e25e8cf7b..085523dc0 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -200,7 +200,7 @@ PaperWalletDialog::PaperWalletDialog(QWidget *parent) :
ui->buttonBox->addButton(tr("Close"), QDialogButtonBox::RejectRole);
// Begin with a small bold monospace font for the textual version of the key and address.
- QFont font("Monospace");
+ QFont font("Courier");
font.setBold(true);
font.setStyleHint(QFont::TypeWriter);
font.setPixelSize(1);
@@ -302,7 +302,7 @@ void PaperWalletDialog::on_getNewAddress_clicked()
// Update the fonts to fit the height of the wallet.
// This should only really trigger the first time since the font size persists.
double paperHeight = (double)ui->paperTemplate->height();
- double maxTextWidth = paperHeight * 0.99;
+ double maxTextWidth = paperHeight * 0.98;
double minTextWidth = paperHeight * 0.95;
int pixelSizeStep = 1;