Skip to content

Commit 7c524b9

Browse files
committed
[GUI] Force NavMenu to show dashboard button at startup.
1 parent 80e1531 commit 7c524b9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/qt/pivx/navmenuwidget.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ void NavMenuWidget::onShowHideColdStakingChanged(bool show) {
164164
ui->scrollAreaNav->verticalScrollBar()->setValue(ui->btnColdStaking->y());
165165
}
166166

167+
void NavMenuWidget::showEvent(QShowEvent *event) {
168+
if (!init) {
169+
init = true;
170+
ui->scrollAreaNav->verticalScrollBar()->setValue(ui->btnDashboard->y());
171+
}
172+
}
173+
167174
void NavMenuWidget::updateButtonStyles(){
168175
forceUpdateStyle({
169176
ui->btnDashboard,

src/qt/pivx/navmenuwidget.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class NavMenuWidget : public PWidget
2323
~NavMenuWidget();
2424

2525
void loadWalletModel() override;
26+
virtual void showEvent(QShowEvent *event) override;
2627

2728
public slots:
2829
void selectSettings();
@@ -44,6 +45,8 @@ private slots:
4445

4546
void connectActions();
4647
void onNavSelected(QWidget* active, bool startup = false);
48+
49+
bool init = false;
4750
};
4851

4952
#endif // NAVMENUWIDGET_H

0 commit comments

Comments
 (0)