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:
@@ -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);
|
||||
|
||||
@@ -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_);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ namespace olive {
|
||||
MainMenu::MainMenu(MainWindow *parent) :
|
||||
QMenuBar(parent)
|
||||
{
|
||||
StyleManager::UseOSNativeStyling(this);
|
||||
|
||||
//
|
||||
// FILE MENU
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user