comparison 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
comparison
equal deleted inserted replaced
292:24fc90078754 293:15b8a4bfe855
50 m_zoomWheelsEnabled = 50 m_zoomWheelsEnabled =
51 settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool(); 51 settings.value("zoom-wheels-enabled", m_zoomWheelsEnabled).toBool();
52 settings.endGroup(); 52 settings.endGroup();
53 53
54 if (getGlobalDarkBackground()) { 54 if (getGlobalDarkBackground()) {
55 m_lightPalette = QPalette(QColor(240, 240, 240)); 55
56 std::cerr << "dark palette:" << std::endl;
57 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl;
58 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl;
59 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl;
60 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl;
61 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl;
62 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl;
63 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl;
64 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl;
65 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl;
66 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl;
67 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl;
68
69 m_lightPalette = QPalette(QColor("#000000"), // WindowText
70 QColor("#dddfe4"), // Button
71 QColor("#ffffff"), // Light
72 QColor("#555555"), // Dark
73 QColor("#c7c7c7"), // Mid
74 QColor("#000000"), // Text
75 QColor("#ffffff"), // BrightText
76 QColor("#ffffff"), // Base
77 QColor("#efefef")); // Window
78
79
56 } else { 80 } else {
57 m_darkPalette = QPalette(QColor(16, 16, 16)); 81 std::cerr << "light palette:" << std::endl;
82 std::cerr << "window = " << QApplication::palette().color(QPalette::Window).name().toStdString() << std::endl;
83 std::cerr << "windowtext = " << QApplication::palette().color(QPalette::WindowText).name().toStdString() << std::endl;
84 std::cerr << "base = " << QApplication::palette().color(QPalette::Base).name().toStdString() << std::endl;
85 std::cerr << "alternatebase = " << QApplication::palette().color(QPalette::AlternateBase).name().toStdString() << std::endl;
86 std::cerr << "text = " << QApplication::palette().color(QPalette::Text).name().toStdString() << std::endl;
87 std::cerr << "button = " << QApplication::palette().color(QPalette::Button).name().toStdString() << std::endl;
88 std::cerr << "buttontext = " << QApplication::palette().color(QPalette::ButtonText).name().toStdString() << std::endl;
89 std::cerr << "brighttext = " << QApplication::palette().color(QPalette::BrightText).name().toStdString() << std::endl;
90 std::cerr << "light = " << QApplication::palette().color(QPalette::Light).name().toStdString() << std::endl;
91 std::cerr << "dark = " << QApplication::palette().color(QPalette::Dark).name().toStdString() << std::endl;
92 std::cerr << "mid = " << QApplication::palette().color(QPalette::Mid).name().toStdString() << std::endl;
93
94 m_darkPalette = QPalette(QColor("#ffffff"), // WindowText
95 QColor("#3e3e3e"), // Button
96 QColor("#808080"), // Light
97 QColor("#1e1e1e"), // Dark
98 QColor("#404040"), // Mid
99 QColor("#ffffff"), // Text
100 QColor("#ffffff"), // BrightText
101 QColor("#000000"), // Base
102 QColor("#202020")); // Window
58 } 103 }
59 } 104 }
60 105
61 ViewManager::~ViewManager() 106 ViewManager::~ViewManager()
62 { 107 {