ui: disable native OS styling

There really isn't much point to maintaining this and it directly opposes Qt's code so we'll be fighting them forever
This commit is contained in:
itsmattkc
2022-03-30 15:07:33 -07:00
parent 7c68efb0ce
commit 9617436584
5 changed files with 0 additions and 21 deletions
-13
View File
@@ -38,19 +38,6 @@ QString StyleManager::current_style_;
QMap<QString, QString> StyleManager::available_themes_;
QPalette StyleManager::platform_palette_;
void StyleManager::UseOSNativeStyling(QWidget *widget)
{
#if defined(Q_OS_WINDOWS)
QStyle* s = QStyleFactory::create(QStringLiteral("windowsvista"));
widget->setStyle(s);
widget->setPalette(platform_palette_);
#elif defined(Q_OS_MAC)
QStyle* s = QStyleFactory::create(QStringLiteral("macintosh"));
widget->setStyle(s);
widget->setPalette(platform_palette_);
#endif
}
QPalette StyleManager::ParsePalette(const QString& ini_path)
{
QSettings ini(ini_path, QSettings::IniFormat);
-2
View File
@@ -36,8 +36,6 @@ public:
static void SetStyle(const QString& style_path);
static void UseOSNativeStyling(QWidget* widget);
static const char* kDefaultStyle;
static const QMap<QString, QString>& available_themes()
@@ -41,7 +41,6 @@ ColorLabelMenuItem::ColorLabelMenuItem(QWidget* parent) :
layout->addWidget(box_);
label_ = new QLabel();
StyleManager::UseOSNativeStyling(label_);
layout->addWidget(label_);
}
-3
View File
@@ -106,9 +106,6 @@ void Menu::Init()
QPalette p = palette();
p.setColor(QPalette::Disabled, QPalette::Light, QColor(0, 0, 0, 0));
setPalette(p);
// If a native palette is available, it should override the one above
StyleManager::UseOSNativeStyling(this);
}
}
-2
View File
@@ -42,8 +42,6 @@ namespace olive {
MainMenu::MainMenu(MainWindow *parent) :
QMenuBar(parent)
{
StyleManager::UseOSNativeStyling(this);
//
// FILE MENU
//