mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
use ArdourButtons on the automation time axis
This commit is contained in:
parent
b4386a6e00
commit
a52e18c7e8
2 changed files with 18 additions and 12 deletions
|
|
@ -127,10 +127,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||||
_base_rect->lower_to_bottom();
|
_base_rect->lower_to_bottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
|
hide_button.set_image ( ::get_icon(X_("hide")));
|
||||||
|
|
||||||
auto_button.set_name ("TrackVisualButton");
|
auto_button.set_name ("mixer strip button");
|
||||||
hide_button.set_name ("TrackRemoveButton");
|
hide_button.set_name ("mixer strip button");
|
||||||
|
|
||||||
auto_button.unset_flags (Gtk::CAN_FOCUS);
|
auto_button.unset_flags (Gtk::CAN_FOCUS);
|
||||||
hide_button.unset_flags (Gtk::CAN_FOCUS);
|
hide_button.unset_flags (Gtk::CAN_FOCUS);
|
||||||
|
|
@ -147,6 +147,9 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||||
set_height (preset_height (HeightNormal));
|
set_height (preset_height (HeightNormal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//name label isn't editable on an automation track; remove the tooltip
|
||||||
|
ARDOUR_UI::instance()->set_tip (name_label, X_(""));
|
||||||
|
|
||||||
/* repack the name label */
|
/* repack the name label */
|
||||||
|
|
||||||
if (name_label.get_parent()) {
|
if (name_label.get_parent()) {
|
||||||
|
|
@ -182,8 +185,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||||
|
|
||||||
controls_table.show_all ();
|
controls_table.show_all ();
|
||||||
|
|
||||||
hide_button.signal_clicked().connect (sigc::mem_fun(*this, &AutomationTimeAxisView::hide_clicked));
|
hide_button.signal_clicked.connect (sigc::mem_fun(*this, &AutomationTimeAxisView::hide_clicked));
|
||||||
auto_button.signal_clicked().connect (sigc::mem_fun(*this, &AutomationTimeAxisView::auto_clicked));
|
auto_button.signal_clicked.connect (sigc::mem_fun(*this, &AutomationTimeAxisView::auto_clicked));
|
||||||
|
|
||||||
controls_base_selected_name = X_("AutomationTrackControlsBaseSelected");
|
controls_base_selected_name = X_("AutomationTrackControlsBaseSelected");
|
||||||
controls_base_unselected_name = X_("AutomationTrackControlsBase");
|
controls_base_unselected_name = X_("AutomationTrackControlsBase");
|
||||||
|
|
@ -298,7 +301,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
||||||
|
|
||||||
switch (state & (ARDOUR::Off|Play|Touch|Write)) {
|
switch (state & (ARDOUR::Off|Play|Touch|Write)) {
|
||||||
case ARDOUR::Off:
|
case ARDOUR::Off:
|
||||||
auto_button.set_label (S_("Automation|Manual"));
|
auto_button.set_text (S_("Automation|Manual"));
|
||||||
if (auto_off_item) {
|
if (auto_off_item) {
|
||||||
ignore_state_request = true;
|
ignore_state_request = true;
|
||||||
auto_off_item->set_active (true);
|
auto_off_item->set_active (true);
|
||||||
|
|
@ -309,7 +312,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Play:
|
case Play:
|
||||||
auto_button.set_label (_("Play"));
|
auto_button.set_text (_("Play"));
|
||||||
if (auto_play_item) {
|
if (auto_play_item) {
|
||||||
ignore_state_request = true;
|
ignore_state_request = true;
|
||||||
auto_play_item->set_active (true);
|
auto_play_item->set_active (true);
|
||||||
|
|
@ -320,7 +323,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Write:
|
case Write:
|
||||||
auto_button.set_label (_("Write"));
|
auto_button.set_text (_("Write"));
|
||||||
if (auto_write_item) {
|
if (auto_write_item) {
|
||||||
ignore_state_request = true;
|
ignore_state_request = true;
|
||||||
auto_write_item->set_active (true);
|
auto_write_item->set_active (true);
|
||||||
|
|
@ -331,7 +334,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Touch:
|
case Touch:
|
||||||
auto_button.set_label (_("Touch"));
|
auto_button.set_text (_("Touch"));
|
||||||
if (auto_touch_item) {
|
if (auto_touch_item) {
|
||||||
ignore_state_request = true;
|
ignore_state_request = true;
|
||||||
auto_touch_item->set_active (true);
|
auto_touch_item->set_active (true);
|
||||||
|
|
@ -342,7 +345,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
auto_button.set_label (_("???"));
|
auto_button.set_text (_("???"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#include "time_axis_view.h"
|
#include "time_axis_view.h"
|
||||||
#include "automation_controller.h"
|
#include "automation_controller.h"
|
||||||
|
#include "ardour_button.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
|
|
@ -143,8 +144,8 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||||
bool ignore_toggle;
|
bool ignore_toggle;
|
||||||
bool first_call_to_set_height;
|
bool first_call_to_set_height;
|
||||||
|
|
||||||
Gtk::Button hide_button;
|
ArdourButton hide_button;
|
||||||
Gtk::Button auto_button;
|
ArdourButton auto_button;
|
||||||
Gtk::Menu* automation_menu;
|
Gtk::Menu* automation_menu;
|
||||||
Gtk::Label* plugname;
|
Gtk::Label* plugname;
|
||||||
bool plugname_packed;
|
bool plugname_packed;
|
||||||
|
|
@ -165,6 +166,8 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||||
void hide_clicked ();
|
void hide_clicked ();
|
||||||
void auto_clicked ();
|
void auto_clicked ();
|
||||||
|
|
||||||
|
virtual bool can_edit_name() const {return false;}
|
||||||
|
|
||||||
void build_display_menu ();
|
void build_display_menu ();
|
||||||
|
|
||||||
void cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
|
void cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue