mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
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:
parent
8bd1b7aa4a
commit
c99fa5f342
5 changed files with 42 additions and 76 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue