summaryrefslogtreecommitdiff
path: root/gtk2_ardour/note_base.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-16 00:05:45 -0500
committerDavid Robillard <d@drobilla.net>2014-12-16 00:05:45 -0500
commite0cb9efb003500fea319552a772364f00753a26f (patch)
treeb49c48d16b2a0e5b9fb94cfa4c335671be3e7fd5 /gtk2_ardour/note_base.h
parent211f8f61d7cc11dcf867010735e335201563b1d2 (diff)
Various color tweaks.
This commit changes some color names, nuke your theme. This isn't quite ideal yet, but takes some steps towards where I think things should go aesthetically: Make automation tracks/regions colors correspond to their parent's type. Make selected MIDI notes outlined in red like most everything else, and scrap separate min/mid/max fill colors for selected MIDI notes. Color automation ghost MIDI notes based on original note color. Try to kill 90's looking brightish gray gradients in general.
Diffstat (limited to 'gtk2_ardour/note_base.h')
-rw-r--r--gtk2_ardour/note_base.h44
1 files changed, 17 insertions, 27 deletions
diff --git a/gtk2_ardour/note_base.h b/gtk2_ardour/note_base.h
index 22dd9d462e..d426a7b59d 100644
--- a/gtk2_ardour/note_base.h
+++ b/gtk2_ardour/note_base.h
@@ -103,36 +103,26 @@ class NoteBase : public sigc::trackable
MidiRegionView& region_view() const { return _region; }
inline static uint32_t meter_style_fill_color(uint8_t vel, bool selected) {
- if (selected) {
- if (vel < 64) {
- return UINT_INTERPOLATE(
- ARDOUR_UI::config()->color_mod ("selected midi note min", "selected midi note"),
- ARDOUR_UI::config()->color_mod ("selected midi note mid", "selected midi note"),
- (vel / (double)63.0));
- } else {
- return UINT_INTERPOLATE(
- ARDOUR_UI::config()->color_mod ("selected midi note mid", "selected midi note"),
- ARDOUR_UI::config()->color_mod ("selected midi note max", "selected midi note"),
- ((vel-64) / (double)63.0));
- }
- } else {
- if (vel < 64) {
- return UINT_INTERPOLATE(
- ARDOUR_UI::config()->color_mod ("midi note min", "midi note"),
- ARDOUR_UI::config()->color_mod ("midi note mid", "midi note"),
- (vel / (double)63.0));
- } else {
- return UINT_INTERPOLATE(
- ARDOUR_UI::config()->color_mod ("midi note mid", "midi note"),
- ARDOUR_UI::config()->color_mod ("midi note max", " midi note"),
- ((vel-64) / (double)63.0));
- }
- }
+ if (vel < 64) {
+ return UINT_INTERPOLATE(
+ ARDOUR_UI::config()->color_mod ("midi note min", "midi note"),
+ ARDOUR_UI::config()->color_mod ("midi note mid", "midi note"),
+ (vel / (double)63.0));
+ } else {
+ return UINT_INTERPOLATE(
+ ARDOUR_UI::config()->color_mod ("midi note mid", "midi note"),
+ ARDOUR_UI::config()->color_mod ("midi note max", " midi note"),
+ ((vel-64) / (double)63.0));
+ }
}
/// calculate outline colors from fill colors of notes
- inline static uint32_t calculate_outline(uint32_t color) {
- return UINT_INTERPOLATE(color, 0x000000ff, 0.5);
+ inline static uint32_t calculate_outline(uint32_t color, bool selected=false) {
+ if (selected) {
+ return ARDOUR_UI::config()->color ("midi note selected outline");
+ } else {
+ return UINT_INTERPOLATE(color, 0x000000ff, 0.5);
+ }
}
/// hue circle divided into 16 equal-looking parts, courtesy Thorsten Wilms