summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-12-22 16:59:12 +0100
committerArno <am@disconnect.de>2010-12-26 20:49:27 +0100
commit7bb7295a9033c0a6729b301e7c9b76393539e29a (patch)
treedf92ec2f09e1cf6797fde07dc495efb051c94b74 /shemov.cpp
parent832d48d3b9249db178f649d00c5c7134bea2becb (diff)
downloadSheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.tar.gz
SheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.tar.bz2
SheMov-7bb7295a9033c0a6729b301e7c9b76393539e29a.zip
Made colors configurable
Added a tab to ConfigurationDialog to make some colors configurable. It works somehow. The font color isn't evaluated yet, since I'm not convinced that it is a good idea. But one problem is that calling qApp->setPalette() doesn't propagate to non visible child dialogs. Dunno if it's worth fixing.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 79712dd..3170699 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -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(){