]> git.sesse.net Git - kdenlive/commitdiff
Small fixes to color scheme change
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 10 Oct 2009 07:54:25 +0000 (07:54 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 10 Oct 2009 07:54:25 +0000 (07:54 +0000)
svn path=/trunk/kdenlive/; revision=4031

src/mainwindow.cpp

index 913d742ac53c660bc5ba338a579a8cb730c4085b..260e3faa0d844d5cd87c1a289ffdd544fa0a3848 100644 (file)
@@ -112,12 +112,10 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, QWidget *parent
         KXmlGuiWindow(parent),
         m_activeDocument(NULL),
         m_activeTimeline(NULL),
-        m_timecodeFormat(NULL),
         m_renderWidget(NULL),
 #ifndef NO_JOGSHUTTLE
         m_jogProcess(NULL),
 #endif /* NO_JOGSHUTTLE */
-        m_zoomSlider(NULL),
         m_findActivated(false)
 {
 
@@ -2970,14 +2968,22 @@ void MainWindow::slotChangePalette(QAction *action, const QString &themename)
     if (theme.isEmpty())
         plt = QApplication::desktop()->palette();
     else {
-        fprintf(stderr, "CReate pal %s\n", theme.toUtf8().data());
         KSharedConfigPtr config = KSharedConfig::openConfig(theme);
         plt = KGlobalSettings::createApplicationPalette(config);
     }
 
     kapp->setPalette(plt);
-    if (m_zoomSlider) m_zoomSlider->setPalette(plt);
-    if (m_timecodeFormat) m_timecodeFormat->setPalette(plt);
+    const QObjectList children = statusBar()->children();
+
+    foreach (QObject *child, children) {
+       if (child->isWidgetType())
+           ((QWidget*)child)->setPalette(plt);
+       const QObjectList subchildren = child->children();
+       foreach (QObject *subchild, subchildren) {
+           if (subchild->isWidgetType())
+               ((QWidget*)subchild)->setPalette(plt);
+       }
+    }
 }