13
0

use ArdourButton for the vertical space/button/label in VCAMasterStrip

This commit is contained in:
Paul Davis 2016-05-18 15:06:01 -04:00
parent effb08c121
commit 1d81392e37
3 changed files with 9 additions and 22 deletions

View File

@ -1020,11 +1020,6 @@ 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"
@ -1038,7 +1033,6 @@ 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"

View File

@ -32,6 +32,7 @@
#include "floating_text_entry.h"
#include "gui_thread.h"
#include "tooltips.h"
#include "ui_config.h"
#include "vca_master_strip.h"
#include "i18n.h"
@ -118,16 +119,11 @@ 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);
//Glib::RefPtr<Pango::Layout> layout = vertical_button.get_layout ();
// layout->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);
vertical_button.set_angle (90);
vertical_button.set_layout_font (UIConfiguration::instance().get_NormalBoldFont());
global_vpacker.set_border_width (1);
global_vpacker.set_spacing (0);
@ -135,7 +131,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
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_box, true, true);
global_vpacker.pack_start (vertical_button, 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);
@ -151,8 +147,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
global_frame.show ();
top_padding.show ();
bottom_padding.show ();
vertical_label.show ();
vertical_box.show ();
vertical_button.show ();
hide_button.show ();
number_label.show ();
width_hide_box.show ();
@ -490,7 +485,7 @@ VCAMasterStrip::vca_property_changed (PropertyChange const & what_changed)
void
VCAMasterStrip::update_vca_name ()
{
vertical_label.set_text (verticalize (short_version (_vca->name(), 15)));
vertical_button.set_text (verticalize (short_version (_vca->name(), 15)));
}
void

View File

@ -65,12 +65,10 @@ 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;
ArdourButton vertical_button;
void hide_clicked();
bool width_button_pressed (GdkEventButton *);