Skip to content

Commit

Permalink
[GUI] Force NavMenu to show dashboard button at startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Jan 14, 2020
1 parent 80e1531 commit 7c524b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/qt/pivx/navmenuwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ void NavMenuWidget::onShowHideColdStakingChanged(bool show) {
ui->scrollAreaNav->verticalScrollBar()->setValue(ui->btnColdStaking->y());
}

void NavMenuWidget::showEvent(QShowEvent *event) {
if (!init) {
init = true;
ui->scrollAreaNav->verticalScrollBar()->setValue(ui->btnDashboard->y());
}
}

void NavMenuWidget::updateButtonStyles(){
forceUpdateStyle({
ui->btnDashboard,
Expand Down
3 changes: 3 additions & 0 deletions src/qt/pivx/navmenuwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class NavMenuWidget : public PWidget
~NavMenuWidget();

void loadWalletModel() override;
virtual void showEvent(QShowEvent *event) override;

public slots:
void selectSettings();
Expand All @@ -44,6 +45,8 @@ private slots:

void connectActions();
void onNavSelected(QWidget* active, bool startup = false);

bool init = false;
};

#endif // NAVMENUWIDGET_H

0 comments on commit 7c524b9

Please sign in to comment.