Introduce Compact Mode

* Added to the new view menu, show entry/group icons at 16px and reduce toolbar icons to 22px. 
* Fix search widget being too large vertically (removed padding)
This commit is contained in:
Jonathan White 2020-06-28 08:26:02 -04:00
parent 4bf6d8d94d
commit fd65a47d51
9 changed files with 58 additions and 25 deletions

View file

@ -107,6 +107,10 @@ MainWindow::MainWindow()
setAcceptDrops(true);
if (config()->get(Config::GUI_CompactMode).toBool()) {
m_ui->toolBar->setIconSize({20, 20});
}
// Setup the search widget in the toolbar
m_searchWidget = new SearchWidget();
m_searchWidget->connectSignals(m_actionMultiplexer);
@ -1684,6 +1688,12 @@ void MainWindow::initViewMenu()
}
});
m_ui->actionCompactMode->setChecked(config()->get(Config::GUI_CompactMode).toBool());
connect(m_ui->actionCompactMode, &QAction::toggled, this, [this](bool checked) {
config()->set(Config::GUI_CompactMode, checked);
restartApp(tr("You must restart the application to apply this setting. Would you like to restart now?"));
});
m_ui->actionShowToolbar->setChecked(!config()->get(Config::GUI_HideToolbar).toBool());
connect(m_ui->actionShowToolbar, &QAction::toggled, this, [this](bool checked) {
config()->set(Config::GUI_HideToolbar, !checked);