Mercurial > hg > svgui
diff view/ViewManager.cpp @ 293:15b8a4bfe855
* continue to pick "new" colours for coloured layers even when all colours
have been used at least once, rather than sticking on the last one
* some messing about with application palette settings
* when replacing an audio file, retain the previous playback settings for
any layers that depended on the old file
* re-check plugin program setting when a parameter changes -- so a plugin
can decide to reset the program if the parameters no longer match those
for the current program
* fix failure to update check-boxes for toggled plugin parameters when their
parameters are changed by program changes
author | Chris Cannam |
---|---|
date | Thu, 09 Aug 2007 14:40:03 +0000 |
parents | 24fc90078754 |
children | 5636eeacc467 |
line wrap: on
line diff
--- a/view/ViewManager.cpp Mon Aug 06 14:37:59 2007 +0000 +++ b/view/ViewManager.cpp Thu Aug 09 14:40:03 2007 +0000 @@ -52,9 +52,54 @@ settings.endGroup(); if (getGlobalDarkBackground()) { - m_lightPalette = QPalette(QColor(240, 240, 240)); + + std::cerr << "dark palette:" << std::endl; + std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl; + std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl; + std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl; + std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl; + std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl; + std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl; + std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl; + std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl; + std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl; + std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl; + std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl; + + m_lightPalette = QPalette(QColor("#000000"), // WindowText + QColor("#dddfe4"), // Button + QColor("#ffffff"), // Light + QColor("#555555"), // Dark + QColor("#c7c7c7"), // Mid + QColor("#000000"), // Text + QColor("#ffffff"), // BrightText + QColor("#ffffff"), // Base + QColor("#efefef")); // Window + + } else { - m_darkPalette = QPalette(QColor(16, 16, 16)); + std::cerr << "light palette:" << std::endl; + std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl; + std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl; + std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl; + std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl; + std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl; + std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl; + std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl; + std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl; + std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl; + std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl; + std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl; + + m_darkPalette = QPalette(QColor("#ffffff"), // WindowText + QColor("#3e3e3e"), // Button + QColor("#808080"), // Light + QColor("#1e1e1e"), // Dark + QColor("#404040"), // Mid + QColor("#ffffff"), // Text + QColor("#ffffff"), // BrightText + QColor("#000000"), // Base + QColor("#202020")); // Window } }