enable NavigationBar for non-Windows systems
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2b0455e2ff
commit
27075778c6
2 changed files with 23 additions and 2 deletions
|
@ -362,6 +362,8 @@ void OptionsDialog::applySettings()
|
||||||
#if QT_VERSION >= 0x050200
|
#if QT_VERSION >= 0x050200
|
||||||
settings->setValue("NavigationBar", ui->cbSnapmaticNavigationBar->isChecked());
|
settings->setValue("NavigationBar", ui->cbSnapmaticNavigationBar->isChecked());
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
settings->setValue("NavigationBar", ui->cbSnapmaticNavigationBar->isChecked());
|
||||||
#endif
|
#endif
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
|
@ -722,8 +724,9 @@ void OptionsDialog::setupSnapmaticPictureViewer()
|
||||||
ui->gbSnapmaticPictureViewer->setVisible(false);
|
ui->gbSnapmaticPictureViewer->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
ui->cbSnapmaticNavigationBar->setVisible(false);
|
settings->beginGroup("Interface");
|
||||||
ui->gbSnapmaticPictureViewer->setVisible(false);
|
ui->cbSnapmaticNavigationBar->setChecked(settings->value("NavigationBar", true).toBool());
|
||||||
|
settings->endGroup();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,6 +215,15 @@ PictureDialog::~PictureDialog()
|
||||||
delete layout()->menuBar();
|
delete layout()->menuBar();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
if (naviEnabled)
|
||||||
|
{
|
||||||
|
for (QObject *obj : layout()->menuBar()->children())
|
||||||
|
{
|
||||||
|
delete obj;
|
||||||
|
}
|
||||||
|
delete layout()->menuBar();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
for (QObject *obj : manageMenu->children())
|
for (QObject *obj : manageMenu->children())
|
||||||
{
|
{
|
||||||
|
@ -247,6 +256,15 @@ void PictureDialog::addPreviousNextButtons()
|
||||||
|
|
||||||
naviEnabled = true;
|
naviEnabled = true;
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this);
|
||||||
|
uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
|
uiToolbar->setObjectName("uiToolbar");
|
||||||
|
uiToolbar->addAction(QIcon(":/img/back.svgz"), "", this, SLOT(previousPictureRequestedSlot()));
|
||||||
|
uiToolbar->addAction(QIcon(":/img/next.svgz"), "", this, SLOT(nextPictureRequestedSlot()));
|
||||||
|
layout()->setMenuBar(uiToolbar);
|
||||||
|
|
||||||
|
naviEnabled = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue