From 75fca54e6141fd81bfcfb2164319333b32bef519 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 6 Jan 2011 01:07:28 +0000 Subject: [PATCH] Make processor box frames configurable colour-wise. git-svn-id: svn://localhost/ardour2/branches/3.0@8459 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour3_ui_dark.rc.in | 24 +++++++++++++++++++----- gtk2_ardour/processor_box.cc | 9 +++++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/ardour3_ui_dark.rc.in b/gtk2_ardour/ardour3_ui_dark.rc.in index ae8e6cf2bf..4be6fdf855 100644 --- a/gtk2_ardour/ardour3_ui_dark.rc.in +++ b/gtk2_ardour/ardour3_ui_dark.rc.in @@ -1223,30 +1223,42 @@ style "processor_list" GtkCheckButton::indicator-spacing = 0 } -style "processor_frame" +# Colour of the frame of the fader in the processor list +style "processor_fader_frame" { - # Colour of the frame of a processor in the processor list bg[NORMAL] = { 0.6, 0.6, 0.6 } } -# A pre-fader processor +# A pre-fader processor's background style "processor_prefader" { bg[NORMAL] = { 0.2, 0.0, 0.0 } } +# A pre-fader processor's frame +style "processor_prefader_frame" +{ + bg[NORMAL] = { 0.0, 0.0, 0.99 } +} + # The fader processor style "processor_fader" { bg[NORMAL] = { 0.4, 0.4, 0.4 } } -# A post-fader processor +# A post-fader processor's background style "processor_postfader" { bg[NORMAL] = { 0.0, 0.2, 0.0 } } +# A post-fader processor's frame +style "processor_postfader_frame" +{ + bg[NORMAL] = { 0.0, 0.99, 0.99 } +} + # MixerPanZone: # # the NORMAL fg color is used for the pan puck @@ -1881,10 +1893,12 @@ widget "*OddPortGroups" style:highest "odd_port_groups" widget "*EvenPortGroups" style:highest "even_port_groups" widget "*MidiListView*" style:highest "white_tree_view" widget "*ProcessorList*" style:highest "processor_list" -widget "*ProcessorFrame*" style:highest "processor_frame" +widget "*ProcessorFaderFrame*" style:highest "processor_fader_frame" widget "*ProcessorPreFader" style:highest "processor_prefader" +widget "*ProcessorPreFaderFrame" style:highest "processor_prefader_frame" widget "*ProcessorFader" style:highest "processor_fader" widget "*ProcessorPostFader" style:highest "processor_postfader" +widget "*ProcessorPostFaderFrame" style:highest "processor_postfader_frame" widget "*PortMatrixLabel*" style:highest "small_text" widget "*MidiTracerTextView" style:highest "midi_tracer_textview" widget "*SoloIsolatedLED" style:highest "solo_isolate_led" diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 45cf5d7660..482ef68d25 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -103,8 +103,6 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr p, Width w) _vbox.pack_start (_hbox); _frame.add (_vbox); - _frame.set_name ("ProcessorFrame"); - _name.set_alignment (0, 0.5); _name.set_text (name ()); _name.set_padding (2, 2); @@ -112,6 +110,7 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr p, Width w) if (boost::dynamic_pointer_cast (p)) { /* Fader processor gets a special look */ _event_box.set_name ("ProcessorFader"); + _frame.set_name ("ProcessorFaderFrame"); _name.set_padding (2, 4); } @@ -1092,6 +1091,10 @@ ProcessorBox::reordered () void ProcessorBox::setup_entry_widget_names () { + /* It just so happens that the action_widget() is the event box (which gives the background + * colour) and the widget() is the frame, more by good luck than good judgement. + */ + list children = processor_display.children (); bool pre_fader = true; for (list::iterator i = children.begin(); i != children.end(); ++i) { @@ -1100,8 +1103,10 @@ ProcessorBox::setup_entry_widget_names () } else { if (pre_fader) { (*i)->action_widget().set_name ("ProcessorPreFader"); + (*i)->widget().set_name ("ProcessorPreFaderFrame"); } else { (*i)->action_widget().set_name ("ProcessorPostFader"); + (*i)->widget().set_name ("ProcessorPostFaderFrame"); } } }