Skip to content

Commit

Permalink
Move toolbar back to top of main window when unmovable
Browse files Browse the repository at this point in the history
* Fix #9384
  • Loading branch information
droidmonkey committed Aug 6, 2023
1 parent 286b5cf commit c041f45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,12 @@ void MainWindow::applySettingsChanges()
}

m_ui->toolBar->setHidden(config()->get(Config::GUI_HideToolbar).toBool());
m_ui->toolBar->setMovable(config()->get(Config::GUI_MovableToolbar).toBool());
auto movable = config()->get(Config::GUI_MovableToolbar).toBool();
m_ui->toolBar->setMovable(movable);
if (!movable) {
// Move the toolbar back to the top of the main window
addToolBar(Qt::TopToolBarArea, m_ui->toolBar);
}

bool isOk = false;
const auto toolButtonStyle =
Expand Down

0 comments on commit c041f45

Please sign in to comment.