Wizard: misc improvements to create wallet pages

Don't focus on Generate button
Replace HTML for PlainTextEdit
Set font using Utils::relativeFont
Change directory button text no longer clips
Wizard Pages are no longer orphans
Vertical spacers no longer take up more room than they need to
GridLayout -> VerticalLayout
This commit is contained in:
tobtoht
2020-10-11 18:41:44 +02:00
parent 12940361d8
commit 89ea34cfb7
5 changed files with 124 additions and 134 deletions
+2 -7
View File
@@ -22,11 +22,7 @@ CreateWalletSeedPage::CreateWalletSeedPage(AppContext *ctx, QWidget *parent) :
this->registerField("mnemonicSeed", ui->hiddenMnemonicSeed);
ui->hiddenMnemonicSeed->hide();
auto fontApp = QApplication::font();
auto fontFamily = fontApp.family();
auto fontSize = fontApp.pointSize() + 2;
m_seedFontFamily = fontFamily;
m_seedFontSize = fontSize;
ui->seed->setFont(Utils::relativeFont(1));
connect(ui->btnRoulette, &QPushButton::clicked, [=]{
this->seedRoulette(0);
@@ -52,8 +48,7 @@ void CreateWalletSeedPage::seedRoulette(int count) {
}
void CreateWalletSeedPage::displaySeed(const QString &seed){
auto html = R"(<html><head><meta name="qrichtext" content="1" /></head><body style="font-family:'%1'; font-size:%2pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%3</p></body></html>)";
ui->seed->setText(QString(html).arg(m_seedFontFamily).arg(m_seedFontSize).arg(seed));
ui->seed->setPlainText(seed);
}
int CreateWalletSeedPage::nextId() const {