diff options
author | Robin Gareus <robin@gareus.org> | 2017-12-21 02:23:11 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-12-21 02:30:01 +0100 |
commit | 5a23719da3c347211383cb670bbd809d1586c9d9 (patch) | |
tree | cbe1f78616d7f1a6c99b31f9e5b1da1caba7c2e3 /libs/surfaces | |
parent | 1deb6525b8cf3560f0715304da3cac25282e88d1 (diff) |
FP8/16: Ignore "black" a strip color, always light select-button
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/faderport8/faderport8.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/faderport8/fp8_strip.cc | 3 | ||||
-rw-r--r-- | libs/surfaces/faderport8/fp8_strip.h | 8 |
3 files changed, 12 insertions, 3 deletions
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index bbb85faac5..9cde77a2ff 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -1007,7 +1007,7 @@ FaderPort8::assign_stripables (bool select_only) if (select_only) { /* used in send mode */ _ctrls.strip(id).set_text_line (3, (*s)->name (), true); - _ctrls.strip(id).select_button ().set_color ((*s)->presentation_info ().color()); + _ctrls.strip(id).set_select_button_color ((*s)->presentation_info ().color()); /* update selection lights */ _ctrls.strip(id).select_button ().set_active ((*s)->is_selected ()); _ctrls.strip(id).select_button ().set_blinking (*s == first_selected_stripable ()); @@ -1803,7 +1803,7 @@ FaderPort8::notify_stripable_property_changed (boost::weak_ptr<Stripable> ws, co uint8_t id = _assigned_strips[s]; if (what_changed.contains (Properties::color)) { - _ctrls.strip(id).select_button ().set_color (s->presentation_info ().color()); + _ctrls.strip(id).set_select_button_color (s->presentation_info ().color()); } if (what_changed.empty ()) { diff --git a/libs/surfaces/faderport8/fp8_strip.cc b/libs/surfaces/faderport8/fp8_strip.cc index 9f875a9443..84a7964035 100644 --- a/libs/surfaces/faderport8/fp8_strip.cc +++ b/libs/surfaces/faderport8/fp8_strip.cc @@ -321,7 +321,8 @@ FP8Strip::set_stripable (boost::shared_ptr<Stripable> s, bool panmode) set_select_controllable (boost::shared_ptr<AutomationControl>()); select_button ().set_active (s->is_selected ()); - select_button ().set_color (s->presentation_info ().color()); + + set_select_button_color (s->presentation_info ().color()); //select_button ().set_blinking (false); _stripable_name = s->name (); diff --git a/libs/surfaces/faderport8/fp8_strip.h b/libs/surfaces/faderport8/fp8_strip.h index 0c9f54b275..c56c34c007 100644 --- a/libs/surfaces/faderport8/fp8_strip.h +++ b/libs/surfaces/faderport8/fp8_strip.h @@ -68,6 +68,14 @@ public: FP8ButtonInterface& recarm_button () { return *_selrec.button_shift(); } FP8ButtonInterface& select_button () { return *_selrec.button(); } + void set_select_button_color (uint32_t color) { + if ((color & 0xffffff00) == 0) { + select_button ().set_color (0xffffffff); + } else { + select_button ().set_color (color); + } + } + bool midi_touch (bool t); bool midi_fader (float val); |