mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Center fader in its (left hand side) mixer strip column.
Attempt to center meter in its as well, but this doesn't seem to be working. Perhaps this whole section should be layed out as a table to ensure the split down the middle is aligned no matter what? git-svn-id: svn://localhost/ardour2/branches/3.0@9555 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a5870e4f96
commit
a54f10d861
4 changed files with 105 additions and 101 deletions
|
|
@ -803,9 +803,9 @@ GainMeterBase::on_theme_changed()
|
|||
|
||||
GainMeter::GainMeter (Session* s, int fader_length)
|
||||
: GainMeterBase (s, slider, false, fader_length)
|
||||
, gain_display_box(true, 2)
|
||||
, hbox(true, 2)
|
||||
{
|
||||
gain_display_box.set_homogeneous (true);
|
||||
gain_display_box.set_spacing (2);
|
||||
gain_display_box.pack_start (gain_display, true, true);
|
||||
|
||||
meter_metric_area.set_name ("AudioTrackMetrics");
|
||||
|
|
@ -825,17 +825,23 @@ GainMeter::GainMeter (Session* s, int fader_length)
|
|||
|
||||
fader_vbox = manage (new Gtk::VBox());
|
||||
fader_vbox->set_spacing (0);
|
||||
fader_vbox->pack_start (*gain_slider, false, false, 0);
|
||||
fader_vbox->pack_start (*gain_slider, true, true);
|
||||
|
||||
hbox.set_spacing (2);
|
||||
hbox.pack_start (*fader_vbox, false, false, 4);
|
||||
fader_alignment.set (0.5, 0.5, 0.0, 1.0);
|
||||
fader_alignment.add (*fader_vbox);
|
||||
|
||||
hbox.pack_start (fader_alignment, true, true);
|
||||
|
||||
set_spacing (2);
|
||||
|
||||
pack_start (gain_display_box, Gtk::PACK_SHRINK);
|
||||
pack_start (hbox, Gtk::PACK_SHRINK);
|
||||
|
||||
meter_metric_area.signal_expose_event().connect (sigc::mem_fun(*this, &GainMeter::meter_metrics_expose));
|
||||
meter_alignment.set (0.5, 0.5, 0.0, 1.0);
|
||||
meter_alignment.add (*level_meter);
|
||||
|
||||
meter_metric_area.signal_expose_event().connect (
|
||||
sigc::mem_fun(*this, &GainMeter::meter_metrics_expose));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -843,8 +849,8 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
|
|||
boost::shared_ptr<PeakMeter> meter,
|
||||
boost::shared_ptr<Amp> amp)
|
||||
{
|
||||
if (level_meter->get_parent()) {
|
||||
hbox.remove (*level_meter);
|
||||
if (meter_alignment.get_parent()) {
|
||||
hbox.remove (meter_alignment);
|
||||
}
|
||||
|
||||
if (peak_display.get_parent()) {
|
||||
|
|
@ -872,7 +878,7 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
|
|||
*/
|
||||
|
||||
gain_display_box.pack_end (peak_display, true, true);
|
||||
hbox.pack_start (*level_meter, true, true);
|
||||
hbox.pack_start (meter_alignment, true, true);
|
||||
|
||||
if (r && !r->is_hidden()) {
|
||||
fader_vbox->pack_start (gain_automation_state_button, false, false, 0);
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ class GainMeter : public GainMeterBase, public Gtk::VBox
|
|||
Gtk::HBox fader_box;
|
||||
Gtk::VBox* fader_vbox;
|
||||
Gtk::HBox hbox;
|
||||
Gtk::Alignment fader_alignment;
|
||||
Gtk::Alignment meter_alignment;
|
||||
std::vector<ARDOUR::DataType> _types;
|
||||
|
||||
static Glib::RefPtr<Gdk::Pixbuf> slider;
|
||||
|
|
|
|||
|
|
@ -263,8 +263,6 @@ MixerStrip::init ()
|
|||
width_hide_box.pack_start (width_button, false, true);
|
||||
width_hide_box.pack_start (top_event_box, true, true);
|
||||
width_hide_box.pack_end (hide_button, false, true);
|
||||
gain_meter_alignment.set_padding(0, 4, 0, 0);
|
||||
gain_meter_alignment.add(gpm);
|
||||
|
||||
whvbox.pack_start (width_hide_box, true, true);
|
||||
|
||||
|
|
@ -274,7 +272,7 @@ MixerStrip::init ()
|
|||
global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (below_panner_box, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (middle_button_table, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (gain_meter_alignment,Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (gpm, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (bottom_button_table, Gtk::PACK_SHRINK);
|
||||
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
|
||||
|
||||
|
|
@ -482,7 +480,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||
middle_button_table.show();
|
||||
bottom_button_table.show();
|
||||
gpm.show_all ();
|
||||
gain_meter_alignment.show ();
|
||||
gain_unit_button.show();
|
||||
gain_unit_label.show();
|
||||
meter_point_button.show();
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
Gtk::VBox whvbox;
|
||||
Gtk::EventBox top_event_box;
|
||||
Gtk::EventBox* spacer;
|
||||
Gtk::Alignment gain_meter_alignment;
|
||||
|
||||
void hide_clicked();
|
||||
void width_clicked ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue