From: Jean-Baptiste Mardelle Date: Sat, 10 Oct 2009 07:54:25 +0000 (+0000) Subject: Small fixes to color scheme change X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=663a4783464930d9cce6a6e6be8c25eac6294d43;p=kdenlive Small fixes to color scheme change svn path=/trunk/kdenlive/; revision=4031 --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 913d742a..260e3faa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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); + } + } }