summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-06 00:29:40 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-06 00:29:40 +0000
commit1f8e12a1b1cd5d6e4d2ec4961f6c50c671bf75b1 (patch)
treeb9bbb905ff2e6be38dd21ef7b372d18d6de65af6 /gtk2_ardour
parentcf1541c3086b376ecac1b70cafef058b4348ab96 (diff)
Another try at prettifying the processor list with different colours pre- and post-fader, a border etc. All colours should now be configurable from the UI RC file.
git-svn-id: svn://localhost/ardour2/branches/3.0@8453 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour3_ui_dark.rc.in54
-rw-r--r--gtk2_ardour/processor_box.cc34
-rw-r--r--gtk2_ardour/processor_box.h5
3 files changed, 69 insertions, 24 deletions
diff --git a/gtk2_ardour/ardour3_ui_dark.rc.in b/gtk2_ardour/ardour3_ui_dark.rc.in
index a50968b91a..ae8e6cf2bf 100644
--- a/gtk2_ardour/ardour3_ui_dark.rc.in
+++ b/gtk2_ardour/ardour3_ui_dark.rc.in
@@ -1205,36 +1205,48 @@ style "inspector_track_list_display" = "track_list_display"
base[SELECTED] = { 0.3, 0.3, 0.4 }
}
-style "processor_list_display"
+style "processor_list"
{
- # font_name = "@FONT_SMALL@"
- # text[NORMAL] = { 0.80, 0.80, 0.80 }
- # text[ACTIVE] = { 0.70, 0.70, 0.70 }
- # text[INSENSITIVE] = { 0, 0, 0 }
- # text[SELECTED] = { 0.9, 0.3, 0.3 }
-
- # base[NORMAL] = { 0, 0, 0 }
- # base[ACTIVE] = { 0, 0, 0 }
- # base[INSENSITIVE] = { 0, 0, 0 }
- # base[SELECTED] = { 0, 0, 0 }
-
- # # these two are explicitly used by the cell renderer for the
- # # text
-
- # fg[NORMAL] = { 0.5, 0.5, 0.5 } # used for inactive
- # fg[ACTIVE] = { 1.0, 1.0, 1.0 } # used for active
-
font_name = "@FONT_SMALLER@"
+
+ # Basic background colour
bg[NORMAL] = { 0, 0, 0 }
+
# A selected processor
bg[SELECTED] = { 0, 0.5, 0.9 }
+
# A send processor whose level is being controlled by the fader
bg[ACTIVE] = { 0.19, 0.97, 0.69 }
fg[ACTIVE] = { 0.0, 0.0, 0.0 }
+
GtkCheckButton::indicator-size = 10
GtkCheckButton::indicator-spacing = 0
}
+style "processor_frame"
+{
+ # Colour of the frame of a processor in the processor list
+ bg[NORMAL] = { 0.6, 0.6, 0.6 }
+}
+
+# A pre-fader processor
+style "processor_prefader"
+{
+ bg[NORMAL] = { 0.2, 0.0, 0.0 }
+}
+
+# The fader processor
+style "processor_fader"
+{
+ bg[NORMAL] = { 0.4, 0.4, 0.4 }
+}
+
+# A post-fader processor
+style "processor_postfader"
+{
+ bg[NORMAL] = { 0.0, 0.2, 0.0 }
+}
+
# MixerPanZone:
#
# the NORMAL fg color is used for the pan puck
@@ -1868,7 +1880,11 @@ widget "*EditorHScrollbar" style:highest "editor_hscrollbar"
widget "*OddPortGroups" style:highest "odd_port_groups"
widget "*EvenPortGroups" style:highest "even_port_groups"
widget "*MidiListView*" style:highest "white_tree_view"
-widget "*ProcessorSelector*" style:highest "processor_list_display"
+widget "*ProcessorList*" style:highest "processor_list"
+widget "*ProcessorFrame*" style:highest "processor_frame"
+widget "*ProcessorPreFader" style:highest "processor_prefader"
+widget "*ProcessorFader" style:highest "processor_fader"
+widget "*ProcessorPostFader" style:highest "processor_postfader"
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 93a1d14bed..45cf5d7660 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -101,14 +101,17 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w)
_event_box.add (_name);
_hbox.pack_start (_event_box, true, true);
_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);
if (boost::dynamic_pointer_cast<Amp> (p)) {
- /* Highlight the fader processor so that pre- and post-fader processors are more obvious */
- _event_box.modify_bg (STATE_NORMAL, Gdk::Color ("#4f4f4f"));
+ /* Fader processor gets a special look */
+ _event_box.set_name ("ProcessorFader");
_name.set_padding (2, 4);
}
@@ -128,7 +131,7 @@ ProcessorEntry::action_widget ()
Gtk::Widget&
ProcessorEntry::widget ()
{
- return _vbox;
+ return _frame;
}
string
@@ -295,9 +298,10 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
pack_start (processor_scroller, true, true);
processor_display.set_flags (CAN_FOCUS);
- processor_display.set_name ("ProcessorSelector");
+ processor_display.set_name ("ProcessorList");
processor_display.set_size_request (48, -1);
processor_display.set_data ("processorbox", this);
+ processor_display.set_spacing (2);
processor_display.signal_enter_notify_event().connect (sigc::mem_fun(*this, &ProcessorBox::enter_notify), false);
processor_display.signal_leave_notify_event().connect (sigc::mem_fun(*this, &ProcessorBox::leave_notify), false);
@@ -989,6 +993,8 @@ ProcessorBox::redisplay_processors ()
i = j;
}
+
+ setup_entry_widget_names ();
}
/** Add a ProcessorWindowProxy for a processor to our list, if that processor does
@@ -1079,6 +1085,26 @@ void
ProcessorBox::reordered ()
{
compute_processor_sort_keys ();
+ setup_entry_widget_names ();
+}
+
+/* Name the Entry widgets according to pre- or post-fader so that they get coloured right */
+void
+ProcessorBox::setup_entry_widget_names ()
+{
+ list<ProcessorEntry*> children = processor_display.children ();
+ bool pre_fader = true;
+ for (list<ProcessorEntry*>::iterator i = children.begin(); i != children.end(); ++i) {
+ if (boost::dynamic_pointer_cast<Amp>((*i)->processor())) {
+ pre_fader = false;
+ } else {
+ if (pre_fader) {
+ (*i)->action_widget().set_name ("ProcessorPreFader");
+ } else {
+ (*i)->action_widget().set_name ("ProcessorPostFader");
+ }
+ }
+ }
}
void
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index 6a9c1312ad..03ed8eb148 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -120,7 +120,8 @@ private:
void processor_active_changed ();
void processor_property_changed (const PBD::PropertyChange&);
std::string name () const;
-
+
+ Gtk::Frame _frame;
Gtk::EventBox _event_box;
Gtk::Label _name;
Gtk::HBox _hbox;
@@ -292,6 +293,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::ProcessorStreams streams);
void on_size_allocate (Gtk::Allocation &);
+ void setup_entry_widget_names ();
+
static ProcessorBox* _current_processor_box;
static void rb_choose_aux (boost::weak_ptr<ARDOUR::Route>);