diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-26 21:24:17 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-26 21:24:17 +0000 |
commit | 316fca72dbad5bae530816714de52eadc9d7f243 (patch) | |
tree | 91787da195c44cdce57587b00d2c17b328bcaabe /gtk2_ardour | |
parent | ac5bbf4b99635a71093f859e233ad5fe4b07453b (diff) |
lots of work to hide prelight from most buttons, etc. etc. etc; increase range of solo boost knob; theme RC files changes need propagating to the light theme, sigh
git-svn-id: svn://localhost/ardour2/branches/3.0@6799 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour3_ui_dark.rc.in | 34 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/canvas-note-event.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/monitor_section.cc | 42 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.cc | 8 |
6 files changed, 52 insertions, 46 deletions
diff --git a/gtk2_ardour/ardour3_ui_dark.rc.in b/gtk2_ardour/ardour3_ui_dark.rc.in index 2ec1f56eee..5fd7696bc8 100644 --- a/gtk2_ardour/ardour3_ui_dark.rc.in +++ b/gtk2_ardour/ardour3_ui_dark.rc.in @@ -268,12 +268,14 @@ style "gain_fader" style "track_rec_enable_button" = "small_button" { + fg[ACTIVE] = { 0.0, 0.0, 0.0 } + bg[ACTIVE] = { 1.0, 0.0, 0.0 } } style "track_rec_enable_button_active" = "small_button" { - fg[SELECTED] = { 0.0, 0.0, 0.0 } fg[ACTIVE] = { 0.0, 0.0, 0.0 } + fg[SELECTED] = { 0.0, 0.0, 0.0 } fg[PRELIGHT] = { 0.0, 0.0, 0.0 } fg[NORMAL] = { 0.0, 0.0, 0.0 } @@ -319,6 +321,8 @@ style "mixer_track_rec_enable_button_active" = "track_rec_enable_button_active" style "solo_button" = "small_button" { + bg[ACTIVE] = { 0.66, 0.97, 0.19 } # solo + fg[ACTIVE] = { 0, 0, 0 } } style "solo_button_alternate" = "small_button" @@ -368,8 +372,16 @@ style "mixer_solo_button_active" = "solo_button_active" ythickness = 0 } +style "monitor_section_button" = "small_button" +{ + bg[ACTIVE] = { 1.0, 0, 0 } + fg[ACTIVE] = { 0, 0, 0 } +} + style "mute_button" = "small_button" { + bg[ACTIVE] = { 0.90, 0.89, 0.73 } + fg[ACTIVE] = { 0, 0, 0 } } style "mute_button_alternate" = "small_button" @@ -398,34 +410,35 @@ style "mute_button_active" = "small_button" fg[PRELIGHT] = { 0, 0, 0 } } -style "mixer_mute_button_alternate" = "mute_button_alternate" +style "mixer_mute_button" = "mute_button" { font_name = "@FONT_SMALLER@" xthickness = 0 ythickness = 0 } -style "mixer_mute_button_active" = "mute_button_active" +style "mixer_mute_button_alternate" = "mute_button_alternate" { font_name = "@FONT_SMALLER@" xthickness = 0 ythickness = 0 } -style "multiline_combo" = "small_button" +style "mixer_mute_button_active" = "mute_button_active" { - font_name = "@FONT_NORMAL@" + font_name = "@FONT_SMALLER@" xthickness = 0 ythickness = 0 } -style "mixer_mute_button" = "mute_button" +style "multiline_combo" = "small_button" { - font_name = "@FONT_SMALLER@" + font_name = "@FONT_NORMAL@" xthickness = 0 ythickness = 0 } + style "track_loop_button" = "small_button" { bg[ACTIVE] = { 1.0, 0.98, 0.53 } @@ -449,6 +462,8 @@ style "time_button" = "default_button" style "transport_button" { + bg[ACTIVE] = { 0.50, 1.0, 0.50 } + fg[ACTIVE] = { 0, 0, 0 } } style "transport_button_active" @@ -466,6 +481,7 @@ style "transport_button_active" style "transport_rec_button" { + bg[ACTIVE] = { 1.0, 0, 0 } } style "transport_rec_button_active" @@ -1413,7 +1429,7 @@ widget "*MixerCommentButton*" style:highest "very_small_button" widget "*MixerMonoButton*" style:highest "very_small_button" widget "*EditGroupButton" style:highest "very_small_button" widget "*EditGroupButtonLabel" style:highest "very_small_button" -widget "*TransportButton" style:highest "transport_rec_button" +widget "*TransportButton" style:highest "transport_button" widget "*TransportButton-active" style:highest "transport_button_active" widget "*TransportSyncButton" style:highest "transport_button" widget "*TransportSyncButton*" style:highest "transport_button" @@ -1581,6 +1597,8 @@ widget "*MixerStripSelectedFrame" style:highest "selected_strip_frame" widget "*MixerStripFrame" style:highest "base_frame" widget "*HWMonitorButton" style:highest "red_when_active" widget "*HWMonitorButton*" style:highest "red_when_active" +widget "*MonitorSectionButton" style:highest "monitor_section_button" +widget "*MonitorSectionButton*" style:highest "monitor_section_button" widget "*BypassButton" style:highest "red_when_active" widget "*BypassButton*" style:highest "red_when_active" widget "*TransportSoloAlert" style:highest "flashing_alert" diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 4fc36dd0e8..d2ddc0d30c 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1532,8 +1532,6 @@ ARDOUR_UI::transport_roll () if (!rolling) { _session->request_transport_speed (1.0f); } - - map_transport_state (); } void @@ -1593,8 +1591,6 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode) _session->request_transport_speed (1.0f); } } - - map_transport_state (); } void @@ -1768,7 +1764,6 @@ ARDOUR_UI::map_transport_state () play_selection_button.set_visual_state (0); auto_loop_button.set_visual_state (0); } - } void diff --git a/gtk2_ardour/canvas-note-event.cc b/gtk2_ardour/canvas-note-event.cc index 958ba3e29a..7fdb931ba9 100644 --- a/gtk2_ardour/canvas-note-event.cc +++ b/gtk2_ardour/canvas-note-event.cc @@ -53,6 +53,8 @@ CanvasNoteEvent::CanvasNoteEvent(MidiRegionView& region, Item* item, CanvasNoteEvent::~CanvasNoteEvent() { + cerr << "Destroying CNE @ " << this << endl; + if (_text) { _text->hide(); delete _text; diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index aec77df8c0..dc70e37a36 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1757,6 +1757,7 @@ MidiRegionView::add_to_selection (CanvasNoteEvent* ev) } if (_selection.insert (ev).second) { + cerr << "Added CNE to selection, size now " << _selection.size() << endl; ev->selected (true); play_midi_note ((ev)->note()); } @@ -2475,8 +2476,12 @@ MidiRegionView::selection_as_cut_buffer () const { Notes notes; + cerr << "Convert selection of " << _selection.size() << " into a cut buffer\n"; + for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) { - notes.insert (boost::shared_ptr<NoteType> (new NoteType (*((*i)->note().get())))); + NoteType* n = (*i)->note().get(); + cerr << "CNE's note is " << n << endl; + notes.insert (boost::shared_ptr<NoteType> (new NoteType (*n))); } MidiCutBuffer* cb = new MidiCutBuffer (trackview.session()); diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index e85bbf13ff..9dff4b101b 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -31,37 +31,16 @@ Glib::RefPtr<ActionGroup> MonitorSection::monitor_actions; Glib::RefPtr<Gdk::Pixbuf> MonitorSection::big_knob_pixbuf; Glib::RefPtr<Gdk::Pixbuf> MonitorSection::little_knob_pixbuf; -static bool -fixup_prelight (GdkEventCrossing* /* ignored */, GtkWidget* widget) -{ - GtkRcStyle* style = gtk_rc_style_copy (gtk_widget_get_modifier_style (widget)); - int current = gtk_widget_get_state (widget); - - style->fg[GTK_STATE_PRELIGHT] = style->fg[current]; - style->bg[GTK_STATE_PRELIGHT] = style->bg[current]; - - gtk_widget_modify_style(widget, style); - g_object_unref(style); - - return false; -} - -static void -block_prelight (Gtk::Widget& w) -{ - w.signal_enter_notify_event().connect (sigc::bind (sigc::ptr_fun (fixup_prelight), w.gobj()), false); -} - MonitorSection::MonitorSection (Session* s) : AxisView (s) , RouteUI (s) , main_table (2, 3) , _tearoff (0) - , gain_adjustment (1.0, 0.0, 1.0, 0.01, 0.1) + , gain_adjustment (0.781787, 0.0, 1.0, 0.01, 0.1) // initial value is unity gain , gain_control (0) , dim_adjustment (0.2, 0.0, 1.0, 0.01, 0.1) , dim_control (0) - , solo_boost_adjustment (1.0, 1.0, 2.0, 0.01, 0.1) + , solo_boost_adjustment (1.0, 1.0, 3.0, 0.01, 0.1) , solo_boost_control (0) , solo_cut_adjustment (0.0, 0.0, 1.0, 0.01, 0.1) , solo_cut_control (0) @@ -111,7 +90,6 @@ MonitorSection::MonitorSection (Session* s) rude_solo_button.set_name ("TransportSoloAlert"); rude_solo_button.show (); - block_prelight (rude_solo_button); ARDOUR_UI::Blink.connect (sigc::mem_fun (*this, &MonitorSection::solo_blink)); rude_solo_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MonitorSection::cancel_solo), false); @@ -196,6 +174,8 @@ MonitorSection::MonitorSection (Session* s) act->connect_proxy (mono_button); } + cut_all_button.set_name (X_("MixerMuteButton")); + cut_all_button.unset_flags (Gtk::CAN_FOCUS); cut_all_button.set_size_request (50,50); cut_all_button.show (); @@ -205,6 +185,11 @@ MonitorSection::MonitorSection (Session* s) bbox->pack_start (mono_button, true, true); bbox->pack_start (dim_all_button, true, true); + dim_all_button.set_name (X_("MonitorSectionButton")); + dim_all_button.unset_flags (Gtk::CAN_FOCUS); + mono_button.set_name (X_("MonitorSectionButton")); + mono_button.unset_flags (Gtk::CAN_FOCUS); + lower_packer.set_spacing (12); lower_packer.pack_start (*bbox, false, false); lower_packer.pack_start (cut_all_button, false, false); @@ -309,16 +294,17 @@ MonitorSection::ChannelButtonSet::ChannelButtonSet () cut.set_name (X_("MixerMuteButton")); dim.set_name (X_("MixerMuteButton")); solo.set_name (X_("MixerSoloButton")); + invert.set_name (X_("MonitorSectionButton")); gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (cut.gobj()), false); gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (dim.gobj()), false); gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (invert.gobj()), false); gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (solo.gobj()), false); - block_prelight (cut); - block_prelight (dim); - block_prelight (solo); - block_prelight (invert); + cut.unset_flags (Gtk::CAN_FOCUS); + dim.unset_flags (Gtk::CAN_FOCUS); + solo.unset_flags (Gtk::CAN_FOCUS); + invert.unset_flags (Gtk::CAN_FOCUS); } void diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index bdbdd11591..62dbd3f2d9 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -109,14 +109,14 @@ RouteUI::init () multiple_solo_change = false; mute_button = manage (new BindableToggleButton ()); - mute_button->set_self_managed (true); + // mute_button->set_self_managed (true); mute_button->set_name ("MuteButton"); mute_button->add (mute_button_label); mute_button_label.show (); UI::instance()->set_tip (mute_button, _("Mute this track"), ""); solo_button = manage (new BindableToggleButton ()); - solo_button->set_self_managed (true); + // solo_button->set_self_managed (true); solo_button->set_name ("SoloButton"); solo_button->add (solo_button_label); solo_button_label.show (); @@ -125,14 +125,14 @@ RouteUI::init () rec_enable_button = manage (new BindableToggleButton ()); rec_enable_button->set_name ("RecordEnableButton"); - rec_enable_button->set_self_managed (true); + // rec_enable_button->set_self_managed (true); rec_enable_button->add (rec_enable_button_label); rec_enable_button_label.show (); UI::instance()->set_tip (rec_enable_button, _("Enable recording on this track"), ""); show_sends_button = manage (new BindableToggleButton ("")); show_sends_button->set_name ("SendAlert"); - show_sends_button->set_self_managed (true); + // show_sends_button->set_self_managed (true); UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), ""); _session->SoloChanged.connect (_session_connections, boost::bind (&RouteUI::solo_changed_so_update_mute, this), gui_context()); |