Amend commit 3af8ff39fc - make it work with Qt 4.x - don't activate it there

This commit is contained in:
Stephan Witt 2020-08-07 12:27:27 +02:00
parent 3af8ff39fc
commit d0ca7a383d

View File

@ -4789,7 +4789,7 @@ void GuiView::resetDialogs()
void GuiView::flatGroupBoxes(const QObject * widget, bool flag)
{
for (const QObject * child: qAsConst(widget->children())) {
for (QObject * child: widget->children()) {
if (child->inherits("QGroupBox")) {
QGroupBox * box = (QGroupBox*) child;
box->setFlat(flag);
@ -4815,9 +4815,11 @@ Dialog * GuiView::findOrBuild(string const & name, bool hide_it)
Dialog * dialog = build(name);
d.dialogs_[name].reset(dialog);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
// Force a uniform style for group boxes
// On Mac non-flat works better, on Linux flat is standard
flatGroupBoxes(dialog->asQWidget(), guiApp->platformName() != "cocoa");
#endif
if (lyxrc.allow_geometry_session)
dialog->restoreSession();
if (hide_it)