Don't alter horizontal padding when shrinking tracks to their minimum height (part of #4014).
git-svn-id: svn://localhost/ardour2/branches/3.0@9472 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bcb554a190
commit
378ea3430f
@ -866,7 +866,7 @@ RouteTimeAxisView::set_height (uint32_t h)
|
||||
|
||||
if (height >= preset_height (HeightNormal)) {
|
||||
|
||||
controls_table.set_border_width (2);
|
||||
_controls_padding_table.set_row_spacings (2);
|
||||
|
||||
reset_meter();
|
||||
|
||||
@ -889,8 +889,8 @@ RouteTimeAxisView::set_height (uint32_t h)
|
||||
|
||||
} else if (height >= preset_height (HeightSmaller)) {
|
||||
|
||||
controls_table.set_border_width (2);
|
||||
|
||||
_controls_padding_table.set_row_spacings (2);
|
||||
|
||||
reset_meter();
|
||||
|
||||
gm.get_gain_slider().hide();
|
||||
@ -912,7 +912,7 @@ RouteTimeAxisView::set_height (uint32_t h)
|
||||
|
||||
} else {
|
||||
|
||||
controls_table.set_border_width (0);
|
||||
_controls_padding_table.set_row_spacings (0);
|
||||
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,7 @@ PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
|
||||
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
|
||||
: AxisView (sess)
|
||||
, controls_table (2, 8)
|
||||
, _controls_padding_table (3, 3)
|
||||
, _size_menu (0)
|
||||
, _y_position (0)
|
||||
, _editor (ed)
|
||||
@ -134,7 +135,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||
name_hbox.show ();
|
||||
|
||||
controls_table.set_size_request (200);
|
||||
controls_table.set_border_width (2);
|
||||
controls_table.set_row_spacings (0);
|
||||
controls_table.set_col_spacings (0);
|
||||
controls_table.set_homogeneous (true);
|
||||
@ -161,7 +161,15 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||
|
||||
HSeparator* separator = manage (new HSeparator());
|
||||
|
||||
controls_vbox.pack_start (controls_table, false, false);
|
||||
/* Use a rather hacky extra table so that we can control the space above/below and
|
||||
* left/right of the controls_table separately. This in turn is so that we can
|
||||
* shrink the vertical space when the track is at its minimum height.
|
||||
*/
|
||||
_controls_padding_table.set_row_spacings (2);
|
||||
_controls_padding_table.set_col_spacings (0);
|
||||
_controls_padding_table.attach (controls_table, 1, 2, 1, 2);
|
||||
|
||||
controls_vbox.pack_start (_controls_padding_table, false, false);
|
||||
controls_vbox.pack_end (resizer_box, false, false);
|
||||
controls_vbox.show ();
|
||||
|
||||
|
@ -219,6 +219,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
|
||||
/* The Standard LHS Controls */
|
||||
Gtk::HBox controls_hbox;
|
||||
Gtk::Table controls_table;
|
||||
Gtk::Table _controls_padding_table;
|
||||
Gtk::EventBox controls_ebox;
|
||||
Gtk::VBox controls_vbox;
|
||||
Gtk::VBox time_axis_vbox;
|
||||
|
Loading…
Reference in New Issue
Block a user