mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-21 17:49:58 -05:00
Merge 37984653d1 into 12935d5b25
This commit is contained in:
commit
fe2dacd0d5
|
|
@ -159,15 +159,13 @@ void Settings::ApplyStyle()
|
|||
{
|
||||
const StyleType style_type = GetStyleType();
|
||||
|
||||
{
|
||||
const bool use_fusion{style_type == StyleType::FusionLight ||
|
||||
style_type == StyleType::FusionDarkGray ||
|
||||
style_type == StyleType::FusionDark};
|
||||
static const QString s_initial_style_name{QApplication::style()->name()};
|
||||
const QString style_name{use_fusion ? QStringLiteral("fusion") : s_initial_style_name};
|
||||
if (QApplication::style()->name() != style_name)
|
||||
QApplication::setStyle(style_name);
|
||||
}
|
||||
const bool use_fusion{style_type == StyleType::FusionLight ||
|
||||
style_type == StyleType::FusionDarkGray ||
|
||||
style_type == StyleType::FusionDark};
|
||||
static const QString s_initial_style_name{QApplication::style()->name()};
|
||||
const QString style_name{use_fusion ? QStringLiteral("fusion") : s_initial_style_name};
|
||||
if (QApplication::style()->name() != style_name)
|
||||
QApplication::setStyle(style_name);
|
||||
|
||||
const QString stylesheet_name = GetUserStyleName();
|
||||
QString stylesheet_contents;
|
||||
|
|
@ -386,6 +384,26 @@ void Settings::ApplyStyle()
|
|||
stylesheet_contents.append(QStringLiteral("%1").arg(tooltip_stylesheet));
|
||||
}
|
||||
|
||||
// For Fusion, define group box style if not already defined.
|
||||
if (style_name.compare(QStringLiteral("fusion"), Qt::CaseInsensitive) == 0 &&
|
||||
!stylesheet_contents.contains(QStringLiteral("QGroupBox")))
|
||||
{
|
||||
stylesheet_contents.append(QStringLiteral("QGroupBox {"
|
||||
" margin-top: 0.6em;"
|
||||
" padding-top: 0.5em;"
|
||||
" padding-bottom: 0;"
|
||||
" padding-left: 1px;"
|
||||
" padding-right: 1px;"
|
||||
"} "
|
||||
"QGroupBox::title {"
|
||||
" subcontrol-origin: margin;"
|
||||
" subcontrol-position: top left;"
|
||||
" left: 0.7em;"
|
||||
" padding-top: 1px;"
|
||||
" min-width: 0;"
|
||||
"}"));
|
||||
}
|
||||
|
||||
qApp->setStyleSheet(stylesheet_contents);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user