updated styling and fixed windows compiling

This commit is contained in:
itsmattkc
2019-07-01 11:39:25 -07:00
parent 026c500802
commit 8f6cb7a2cb
9 changed files with 12 additions and 48 deletions
+4 -12
View File
@@ -23,6 +23,7 @@
#include <QApplication>
#include <QFile>
#include <QPalette>
#include <QStyle>
#include <QStyleFactory>
#include <QTextStream>
@@ -35,20 +36,11 @@ void olive::style::AppSetDefault()
QFile css_file(":/css/olive-dark.css");
if (css_file.open(QFile::ReadOnly | QFile::Text)) {
// Read in entire CSS from file and set as the application stylesheet
QTextStream css_ts(&css_file);
qApp->setStyleSheet(css_ts.readAll());
css_file.close();
}
}
void olive::style::WidgetSetNative(QWidget *w)
{
#ifdef Q_OS_WIN
w->setStyleSheet("");
w->setPalette(w->style()->standardPalette());
w->setStyleSheet(QString());
w->setStyle(QStyleFactory::create("windowsvista"));
#else
Q_UNUSED(w)
#endif
}