mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 03:59:29 +00:00
Merge pull request 'SeedDialog: show restore height for 25 word seeds' (#173) from tobtoht/feather:seed_restore_height into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/173
This commit is contained in:
commit
841739cee9
3 changed files with 99 additions and 28 deletions
|
@ -68,9 +68,7 @@ HelpLabel::HelpLabel(QWidget *parent) : QLabel(parent)
|
|||
void HelpLabel::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QMessageBox msgBox(QApplication::activeWindow());
|
||||
msgBox.setText(this->help_text);
|
||||
msgBox.exec();
|
||||
QMessageBox::information(this, "Help", this->help_text);
|
||||
}
|
||||
|
||||
void HelpLabel::enterEvent(QEvent *event)
|
||||
|
|
|
@ -11,6 +11,8 @@ SeedDialog::SeedDialog(Wallet *wallet, QWidget *parent)
|
|||
ui->setupUi(this);
|
||||
ui->label_seedIcon->setPixmap(QPixmap(":/assets/images/seed.png").scaledToWidth(64, Qt::SmoothTransformation));
|
||||
|
||||
ui->label_restoreHeight->setText(QString::number(wallet->getWalletCreationHeight()));
|
||||
|
||||
QString seed_14_words = wallet->getCacheAttribute("feather.seed");
|
||||
QString seed_25_words = wallet->getSeed();
|
||||
|
||||
|
@ -19,10 +21,16 @@ SeedDialog::SeedDialog(Wallet *wallet, QWidget *parent)
|
|||
this->setSeed(seed_25_words);
|
||||
} else {
|
||||
this->setSeed(seed_14_words);
|
||||
ui->widgetRestoreHeight->setVisible(false);
|
||||
}
|
||||
|
||||
connect(ui->check_toggleSeedType, &QCheckBox::toggled, [this, seed_25_words, seed_14_words](bool toggled){
|
||||
this->setSeed(toggled ? seed_25_words : seed_14_words);
|
||||
ui->widgetRestoreHeight->setVisible(toggled);
|
||||
});
|
||||
}
|
||||
|
||||
ui->label_restoreHeightHelp->setHelpText("Should you restore your wallet in the future, "
|
||||
"specifying this block number will recover your wallet quicker.");
|
||||
|
||||
this->adjustSize();
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>542</width>
|
||||
<height>259</height>
|
||||
<width>590</width>
|
||||
<height>346</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -33,6 +33,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="seed">
|
||||
<property name="enabled">
|
||||
|
@ -44,10 +46,16 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>125</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>125</height>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
|
@ -55,6 +63,56 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetRestoreHeight" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="HelpLabel" name="label_restoreHeightHelp">
|
||||
<property name="text">
|
||||
<string>Restore height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_restoreHeight">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -86,6 +144,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>HelpLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>components.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
Loading…
Reference in a new issue