summaryrefslogtreecommitdiff
path: root/libs/surfaces/push2
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-09-23 13:52:23 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-27 14:59:32 -0500
commit48087c3161e4f4ab00b364ddb14f9ef9d1ee6937 (patch)
tree823fc2f35252da7365634fd4a262af3fff454307 /libs/surfaces/push2
parent37233fe92f5962492f33a76a10e2ff573a7cb903 (diff)
update selection rect color when track color changes
Diffstat (limited to 'libs/surfaces/push2')
-rw-r--r--libs/surfaces/push2/mix.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/surfaces/push2/mix.cc b/libs/surfaces/push2/mix.cc
index 8aa3cab5c4..58e29fc877 100644
--- a/libs/surfaces/push2/mix.cc
+++ b/libs/surfaces/push2/mix.cc
@@ -430,6 +430,18 @@ MixLayout::strip_vpot_touch (int n, bool touching)
void
MixLayout::stripable_property_change (PropertyChange const& what_changed, uint32_t which)
{
+ if (what_changed.contains (Properties::color)) {
+ lower_backgrounds[which]->set_fill_color (stripable[which]->presentation_info().color());
+
+ if (stripable[which]->presentation_info().selected()) {
+ lower_text[which]->set_fill_color (contrasting_text_color (stripable[which]->presentation_info().color()));
+ /* might not be a MIDI track, in which case this will
+ do nothing
+ */
+ p2.update_selection_color ();
+ }
+ }
+
if (what_changed.contains (Properties::hidden)) {
switch_bank (bank_start);
}
@@ -655,7 +667,6 @@ MixLayout::button_select_release ()
} else {
if (p2.modifier_state() & Push2::ModShift) {
- std::cerr << "select prev\n";
/* select prev */
if (selected == 0) {
@@ -682,7 +693,6 @@ MixLayout::button_select_release ()
} else {
- std::cerr << "select next\n";
/* select next */
if (selected == 7) {