mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-12 09:37:47 +00:00
Settings: remember last page
This commit is contained in:
parent
1e6f821a2f
commit
a02dadcd24
5 changed files with 12 additions and 0 deletions
|
@ -856,6 +856,11 @@ void MainWindow::menuVerifyTxProof() {
|
|||
dialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::onShowSettingsPage(int page) {
|
||||
config()->set(Config::lastSettingsPage, page);
|
||||
this->menuSettingsClicked();
|
||||
}
|
||||
|
||||
void MainWindow::skinChanged(const QString &skinName) {
|
||||
m_windowManager->changeSkin(skinName);
|
||||
ColorScheme::updateFromWidget(this);
|
||||
|
|
|
@ -120,6 +120,7 @@ private slots:
|
|||
void onCreateDesktopEntry(bool checked);
|
||||
void onShowDocumentaton();
|
||||
void onReportBug(bool checked);
|
||||
void onShowSettingsPage(int page);
|
||||
|
||||
// offline tx signing
|
||||
void exportKeyImages();
|
||||
|
|
|
@ -21,6 +21,10 @@ Settings::Settings(QSharedPointer<AppContext> ctx, QWidget *parent)
|
|||
|
||||
ui->tabWidget->setTabVisible(3, false);
|
||||
ui->tabWidget->setTabVisible(6, false);
|
||||
ui->tabWidget->setCurrentIndex(config()->get(Config::lastSettingsPage).toInt());
|
||||
connect(ui->tabWidget, &QTabWidget::currentChanged, [this](int index){
|
||||
config()->set(Config::lastSettingsPage, index);
|
||||
});
|
||||
|
||||
connect(ui->btnCopyToClipboard, &QPushButton::clicked, this, &Settings::copyToClipboard);
|
||||
connect(ui->checkBox_multiBroadcast, &QCheckBox::toggled, [](bool toggled){
|
||||
|
|
|
@ -59,6 +59,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||
{Config::pools,{QS("pools"), {}}},
|
||||
|
||||
// Settings
|
||||
{Config::lastSettingsPage, {QS("lastSettingsPage"), 0}},
|
||||
{Config::preferredFiatCurrency,{QS("preferredFiatCurrency"), "USD"}},
|
||||
{Config::skin,{QS("skin"), "light"}},
|
||||
{Config::amountPrecision, {QS("amountPrecision"), 12}},
|
||||
|
|
|
@ -63,6 +63,7 @@ public:
|
|||
pools,
|
||||
|
||||
// Settings
|
||||
lastSettingsPage,
|
||||
preferredFiatCurrency,
|
||||
skin,
|
||||
amountPrecision,
|
||||
|
|
Loading…
Reference in a new issue