-fixed stylesheet loading.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@298 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2008-01-18 23:18:21 +00:00
parent 1b42c9457e
commit da88c394f0
2 changed files with 6 additions and 7 deletions

View File

@ -129,7 +129,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
ui.quitButton->setToolTip(tr("Quit")); ui.quitButton->setToolTip(tr("Quit"));
//connect(ui.quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); //connect(ui.quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
connect(ui.quitButton, SIGNAL(clicked()), this, SLOT(doQuit())); connect(ui.quitButton, SIGNAL(clicked()), this, SLOT(doQuit()));
loadStyleSheet("Default");
/* load the StyleSheet*/
loadStyleSheet(Rshare::stylesheet());

View File

@ -85,16 +85,13 @@ GeneralDialog::load()
index = ui.cmboStyle->findData(Rshare::style().toLower()); index = ui.cmboStyle->findData(Rshare::style().toLower());
ui.cmboStyle->setCurrentIndex(index); ui.cmboStyle->setCurrentIndex(index);
index = ui.styleSheetCombo->findData(Rshare::stylesheet().toLower());
ui.styleSheetCombo->setCurrentIndex(index);
//index = ui.styleSheetCombo->findData(_settings->getSheetName()); ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText(_settings->getSheetName()));
//ui.styleSheetCombo->setCurrentIndex(index);
/* load internal styleSheet */ /** load saved internal styleSheet **/
//QFile file(":/qss/" + (_settings->getSheetName().toLower()) + ".qss"); //QFile file(":/qss/" + (_settings->getSheetName().toLower()) + ".qss");
/** load extern Stylesheets **/ /** load saved extern Stylesheets **/
QFile file(QApplication::applicationDirPath() + "/qss/" + (_settings->getSheetName().toLower()) + ".qss"); QFile file(QApplication::applicationDirPath() + "/qss/" + (_settings->getSheetName().toLower()) + ".qss");
file.open(QFile::ReadOnly); file.open(QFile::ReadOnly);