diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -69,8 +69,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mATree, SIGNAL(needWindowTitleChange(QString)), this, SLOT(setWindowTitle(QString))); connect(mATree->filesWidget()->filesTree()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(updateSelectionCount(const QItemSelection &, const QItemSelection &))); connect(mATree->seriesWidget()->seriesTree()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionCount(QItemSelection,QItemSelection))); - connect(this, SIGNAL(configChanged()), mATree->seriesWidget()->seriesTree(), SLOT(readConfig())); - connect(this, SIGNAL(configChanged()), mATree->filesWidget()->filesTree(), SLOT(readConfig())); + connect(this, SIGNAL(configChanged()), mATree, SLOT(readSettings())); //newmoviewizard mNewMovieWizard = new NewMovieWizard(this); @@ -102,7 +101,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla setCentralWidget(centralWidget); show(); mATree->seriesWidget()->readSettings(); - mATree->filesWidget()->filesTree()->readConfig(); + mATree->filesWidget()->filesTree()->readSettings(); mFSWidget->readSettings(); readSettings(); mFSWidget->fileView()->setFocus(Qt::ActiveWindowFocusReason); @@ -859,6 +858,18 @@ void SheMov::readSettings(){ } } } + bool alternate = s.value("ui/allowalternate").toBool(); + QPalette pal(palette()); + if(alternate){ + QVariant basecolor = s.value("ui/basecolor"); + QVariant alternatecolor = s.value("ui/alternatecolor"); + pal.setColor(QPalette::Base, basecolor.value<QColor>()); + pal.setColor(QPalette::AlternateBase, alternatecolor.value<QColor>()); + }else{ + pal.setColor(QPalette::Base, Qt::white); + pal.setColor(QPalette::AlternateBase, Qt::white); + } + qApp->setPalette(pal); } void SheMov::checkConsistency(){ |