summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2011-09-10 02:35:15 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2011-09-10 02:35:15 +0000
commit85ede352104d0dd1ec39996741faa4aea0b072b5 (patch)
tree10afb485bd7369e916e28569e0964360fb7344be
parent2d847714ede4042f8a02bb0ed79bf2dc1f069709 (diff)
colorful sliders for the plugins
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/plugin.cpp6
2 files changed, 6 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index ceb70e70..50242b94 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -18,6 +18,7 @@
in Audio::startRolling().
- Cleaned some namespace change artifacts. Fixed signal/slot mechanism related to bigtime, pianoroll,
drumedit (Orcan)
+ - Made plugin slider colors fancy, experimental. (Orcan)
08.09.2011:
- Finished namespace MusEWidget. Added namespaces MusEUtil, MusEDialog. (Orcan)
07.09.2011:
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index 75d1ae45..f0dfdaf0 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -3596,8 +3596,12 @@ PluginGui::PluginGui(PluginIBase* p)
params[i].label->setPrecision(2);
params[i].label->setId(i);
+ // Let sliders all have different but unique colors
+ uint hast = qHash(plugin->paramName(i));
+ QColor color((uint) (hast * hast) % 16777216);
+
MusEWidget::Slider* s = new MusEWidget::Slider(0, "param", Qt::Horizontal,
- MusEWidget::Slider::None); //, style);
+ MusEWidget::Slider::None, color);
s->setCursorHoming(true);
s->setId(i);