Make processor box frames configurable colour-wise.

git-svn-id: svn://localhost/ardour2/branches/3.0@8459 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-01-06 01:07:28 +00:00
parent 61bb7c5852
commit 75fca54e61
2 changed files with 26 additions and 7 deletions

View File

@ -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"

View File

@ -103,8 +103,6 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> 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<Processor> p, Width w)
if (boost::dynamic_pointer_cast<Amp> (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<ProcessorEntry*> children = processor_display.children ();
bool pre_fader = true;
for (list<ProcessorEntry*>::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");
}
}
}