vertical VCA names in VCA strips
This commit is contained in:
parent
a2704dbff8
commit
2886b9659b
|
@ -1019,6 +1019,12 @@ style "settings_notebook" = "big_text"
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
style "vca_vertical_box" = "medium_bold_text"
|
||||
{
|
||||
bg[NORMAL] = shade (0.82, @background)
|
||||
}
|
||||
|
||||
class "GtkWidget" style:highest "default"
|
||||
class "GtkScrollbar" style:highest "ardour_adjusters"
|
||||
class "GtkLabel" style:highest "default_generic"
|
||||
|
@ -1032,6 +1038,7 @@ widget "*MarkerText" style:highest "marker_text"
|
|||
widget "*ArdourContextMenu*" style:highest "default_menu"
|
||||
|
||||
widget "*mixer strip button" style:highest "very_small_button"
|
||||
widget "*vca_vertical_box" style:highest "vca_vertical_box"
|
||||
|
||||
widget "*AddRouteDialogSpinner" style:highest "ardour_adjusters"
|
||||
widget "*OptionsNotebook" style:highest "preferences"
|
||||
|
|
|
@ -45,6 +45,30 @@ using std::string;
|
|||
|
||||
PBD::Signal1<void,VCAMasterStrip*> VCAMasterStrip::CatchDeletion;
|
||||
|
||||
static string
|
||||
verticalize (string const & str)
|
||||
{
|
||||
return str;
|
||||
#if 0
|
||||
string ret;
|
||||
string::const_iterator s = str.begin();
|
||||
ret = *s;
|
||||
ret += '\n';
|
||||
++s;
|
||||
|
||||
while (s != str.end()) {
|
||||
ret += *s;
|
||||
ret += '\n';
|
||||
++s;
|
||||
}
|
||||
|
||||
/* remove terminal newline */
|
||||
|
||||
ret.erase (ret.length() - 1, string::npos);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
|
||||
: AxisView (s)
|
||||
, _vca (v)
|
||||
|
@ -94,13 +118,24 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
|
|||
top_padding.set_size_request (-1, 16); /* must match height in GroupTabs::set_size_request() */
|
||||
bottom_padding.set_size_request (-1, 50); /* this one is a hack. there's no trivial way to compute it */
|
||||
|
||||
vertical_label.set_justify (JUSTIFY_CENTER);
|
||||
/* horizontally centered, with a little space (5%) at the top */
|
||||
vertical_label.set_alignment (0.5, 0.05);
|
||||
vertical_label.set_name (X_("vca_vertical_box"));
|
||||
vertical_label.set_angle (270); /* top to bottom */
|
||||
|
||||
vertical_box.add (vertical_label);
|
||||
vertical_box.set_name (X_("vca_vertical_box"));
|
||||
vertical_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
vertical_box.signal_button_press_event().connect (sigc::mem_fun (*this, &VCAMasterStrip::vertical_box_press), false);
|
||||
|
||||
global_vpacker.set_border_width (1);
|
||||
global_vpacker.set_spacing (0);
|
||||
|
||||
global_vpacker.pack_start (top_padding, false, false);
|
||||
global_vpacker.pack_start (width_hide_box, false, false);
|
||||
global_vpacker.pack_start (name_button, false, false);
|
||||
global_vpacker.pack_start (vertical_padding, true, true);
|
||||
global_vpacker.pack_start (vertical_box, true, true);
|
||||
global_vpacker.pack_start (solo_mute_box, false, false);
|
||||
global_vpacker.pack_start (gain_meter, false, false);
|
||||
global_vpacker.pack_start (assign_button, false, false);
|
||||
|
@ -116,7 +151,8 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
|
|||
global_frame.show ();
|
||||
top_padding.show ();
|
||||
bottom_padding.show ();
|
||||
vertical_padding.show ();
|
||||
vertical_label.show ();
|
||||
vertical_box.show ();
|
||||
hide_button.show ();
|
||||
number_label.show ();
|
||||
width_hide_box.show ();
|
||||
|
@ -135,6 +171,9 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
|
|||
solo_changed ();
|
||||
mute_changed ();
|
||||
|
||||
/* this remains unchanged as the name changes */
|
||||
name_button.set_text (string_compose (X_("VCA %1"), _vca->number()));
|
||||
|
||||
_vca->PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context());
|
||||
|
||||
_vca->solo_control()->Changed.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::solo_changed, this), gui_context());
|
||||
|
@ -383,6 +422,12 @@ VCAMasterStrip::vca_button_release (GdkEventButton* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
VCAMasterStrip::vertical_box_press (GdkEventButton* ev)
|
||||
{
|
||||
return name_button_press (ev);
|
||||
}
|
||||
|
||||
bool
|
||||
VCAMasterStrip::name_button_press (GdkEventButton* ev)
|
||||
{
|
||||
|
@ -422,7 +467,7 @@ VCAMasterStrip::vca_property_changed (PropertyChange const & what_changed)
|
|||
void
|
||||
VCAMasterStrip::update_vca_name ()
|
||||
{
|
||||
name_button.set_text (short_version (_vca->name(), 8));
|
||||
vertical_label.set_text (verticalize (short_version (_vca->name(), 15)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -49,7 +49,6 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox
|
|||
|
||||
private:
|
||||
boost::shared_ptr<ARDOUR::VCA> _vca;
|
||||
Gtk::HBox vertical_padding;
|
||||
ArdourButton name_button;
|
||||
GainMeter gain_meter;
|
||||
|
||||
|
@ -66,9 +65,12 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox
|
|||
ArdourButton solo_button;
|
||||
ArdourButton mute_button;
|
||||
ArdourButton assign_button;
|
||||
ArdourButton spill_button;
|
||||
Gtk::Menu* context_menu;
|
||||
PBD::ScopedConnectionList vca_connections;
|
||||
Gtk::MessageDialog* delete_dialog;
|
||||
Gtk::EventBox vertical_box;
|
||||
Gtk::Label vertical_label;
|
||||
|
||||
void hide_clicked();
|
||||
bool width_button_pressed (GdkEventButton *);
|
||||
|
@ -85,6 +87,7 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox
|
|||
void update_vca_display ();
|
||||
void finish_name_edit (std::string);
|
||||
bool name_button_press (GdkEventButton*);
|
||||
bool vertical_box_press (GdkEventButton*);
|
||||
void vca_property_changed (PBD::PropertyChange const & what_changed);
|
||||
void update_vca_name ();
|
||||
void build_context_menu ();
|
||||
|
|
Loading…
Reference in New Issue
Block a user