Added patch from braindead

- Added empty entry to stylesheet-choice for "no stylesheet" and moved method "loadStyleSheet" from MainWindow to Rshare


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5133 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-05-02 20:19:51 +00:00
parent 8bd1b7aa4a
commit c99fa5f342
5 changed files with 42 additions and 76 deletions

View file

@ -359,6 +359,21 @@ void Rshare::resetLanguageAndStyle()
setSheet(_args.value(ARG_GUISTYLESHEET));
}
void Rshare::loadStyleSheet(const QString &sheetName)
{
QString styleSheet;
if (!sheetName.isEmpty()) {
/** extern Stylesheets **/
QFile file(QApplication::applicationDirPath() + "/qss/" + sheetName.toLower() + ".qss");
if (file.open(QFile::ReadOnly)) {
styleSheet = QLatin1String(file.readAll());
file.close();
}
}
qApp->setStyleSheet(styleSheet);
}
/** Initialize plugins. */
void Rshare::initPlugins()
{