summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour-sae.menus1
-rw-r--r--gtk2_ardour/ardour.menus.in1
-rw-r--r--gtk2_ardour/editor_actions.cc4
-rw-r--r--gtk2_ardour/enums.h3
-rw-r--r--gtk2_ardour/route_time_axis.cc10
-rw-r--r--gtk2_ardour/time_axis_view.cc44
-rw-r--r--gtk2_ardour/time_axis_view.h21
7 files changed, 20 insertions, 64 deletions
diff --git a/gtk2_ardour/ardour-sae.menus b/gtk2_ardour/ardour-sae.menus
index 5bce7f1dc4..16fcd8f5df 100644
--- a/gtk2_ardour/ardour-sae.menus
+++ b/gtk2_ardour/ardour-sae.menus
@@ -191,7 +191,6 @@
<menuitem action='track-height-large'/>
<menuitem action='track-height-larger'/>
<menuitem action='track-height-normal'/>
- <menuitem action='track-height-smaller'/>
<menuitem action='track-height-small'/>
</menu>
<menu action='WaveformMenu'>
diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in
index 8d21a4afa9..ddc3a50bf7 100644
--- a/gtk2_ardour/ardour.menus.in
+++ b/gtk2_ardour/ardour.menus.in
@@ -313,7 +313,6 @@
<menuitem action='track-height-larger'/>
<menuitem action='track-height-large'/>
<menuitem action='track-height-normal'/>
- <menuitem action='track-height-smaller'/>
<menuitem action='track-height-small'/>
</menu>
<menuitem action='track-record-enable-toggle'/>
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index f2709e38ec..cec7b03721 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -375,10 +375,6 @@ Editor::register_actions ()
act = reg_sens (editor_actions, "track-height-small", _("Small"), sigc::bind (
sigc::mem_fun(*this, &Editor::set_track_height), HeightSmall));
ActionManager::track_selection_sensitive_actions.push_back (act);
- ActionManager::track_selection_sensitive_actions.push_back (act);
- act = reg_sens (editor_actions, "track-height-smaller", _("Smaller"), sigc::bind (
- sigc::mem_fun(*this, &Editor::set_track_height), HeightSmaller));
- ActionManager::track_selection_sensitive_actions.push_back (act);
Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
RadioAction::Group zoom_group;
diff --git a/gtk2_ardour/enums.h b/gtk2_ardour/enums.h
index 0b0e95f828..92b2923894 100644
--- a/gtk2_ardour/enums.h
+++ b/gtk2_ardour/enums.h
@@ -50,8 +50,7 @@ enum Height {
HeightLarger,
HeightLarge,
HeightNormal,
- HeightSmall,
- HeightSmaller
+ HeightSmall
};
extern void setup_gtk_ardour_enums ();
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index e86074bac7..9e0d06dda6 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -867,8 +867,6 @@ RouteTimeAxisView::set_height (uint32_t h)
if (height >= preset_height (HeightNormal)) {
- _controls_padding_table.set_row_spacings (2);
-
reset_meter();
gm.get_gain_slider().show();
@@ -888,9 +886,7 @@ RouteTimeAxisView::set_height (uint32_t h)
playlist_button.show();
}
- } else if (height >= preset_height (HeightSmaller)) {
-
- _controls_padding_table.set_row_spacings (2);
+ } else {
reset_meter();
@@ -911,10 +907,6 @@ RouteTimeAxisView::set_height (uint32_t h)
playlist_button.hide ();
}
- } else {
-
- _controls_padding_table.set_row_spacings (0);
-
}
if (height_changed && !no_redraw) {
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 0d51ec1d6b..925107d9e8 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -68,14 +68,13 @@ using Gtkmm2ext::Keyboard;
const double trim_handle_size = 6.0; /* pixels */
uint32_t TimeAxisView::extra_height;
-uint32_t TimeAxisView::smaller_height;
+uint32_t TimeAxisView::small_height;
int const TimeAxisView::_max_order = 512;
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)
@@ -161,16 +160,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
HSeparator* separator = manage (new HSeparator());
- /* 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_padding_table.show ();
-
- controls_vbox.pack_start (_controls_padding_table, false, false);
+ controls_vbox.pack_start (controls_table, false, false);
controls_vbox.pack_end (resizer_box, false, false);
controls_vbox.show ();
@@ -401,23 +391,17 @@ TimeAxisView::step_height (bool coarser)
if (coarser) {
- if (height == preset_height (HeightSmall)) {
+ if (height <= preset_height (HeightSmall)) {
return;
- }
-
- if (height <= preset_height (HeightSmaller) && height > preset_height (HeightSmall)) {
+ } else if (height <= preset_height (HeightNormal) && height > preset_height (HeightSmall)) {
set_height_enum (HeightSmall);
- } else if (height <= preset_height (HeightNormal) && height > preset_height (HeightSmaller)) {
- set_height_enum (HeightSmaller);
} else {
set_height (height - step);
}
} else {
- if (height == preset_height(HeightSmall)) {
- set_height_enum (HeightSmaller);
- } else if (height == preset_height(HeightSmaller)) {
+ if (height <= preset_height(HeightSmall)) {
set_height_enum (HeightNormal);
} else {
set_height (height + step);
@@ -507,13 +491,6 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev)
}
}
-
- /* resize to show editable name display */
-
- if ((*i)->current_height() <= preset_height (HeightSmaller)) {
- (*i)->set_height_enum (HeightSmaller);
- }
-
(*i)->name_entry.grab_focus();
}
return true;
@@ -1039,9 +1016,7 @@ TimeAxisView::set_state (const XMLNode& node, int /*version*/)
set_height_enum (HeightLarger);
} else if (prop->value() == "normal") {
set_height_enum (HeightNormal);
- } else if (prop->value() == "smaller") {
- set_height_enum (HeightSmaller);
- } else if (prop->value() == "small") {
+ } else if (prop->value() == "smaller" || prop->value() == "small") {
set_height_enum (HeightSmall);
} else {
error << string_compose(_("unknown track height name \"%1\" in XML GUI information"), prop->value()) << endmsg;
@@ -1106,7 +1081,7 @@ TimeAxisView::compute_heights ()
// height required to show 1 row of buttons
- smaller_height = req.height + extra_height;
+ small_height = req.height + (2 * border_width);
}
void
@@ -1336,9 +1311,7 @@ TimeAxisView::preset_height (Height h)
case HeightNormal:
return extra_height + 48;
case HeightSmall:
- return 27;
- case HeightSmaller:
- return smaller_height;
+ return small_height;
}
/* NOTREACHED */
@@ -1379,6 +1352,5 @@ TimeAxisView::build_size_menu ()
items.push_back (MenuElem (_("Larger"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightLarger, true)));
items.push_back (MenuElem (_("Large"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightLarge, true)));
items.push_back (MenuElem (_("Normal"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightNormal, true)));
- items.push_back (MenuElem (_("Smaller"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightSmaller, true)));
items.push_back (MenuElem (_("Small"), sigc::bind (sigc::mem_fun (*this, &TimeAxisView::set_height_enum), HeightSmall, true)));
}
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index f9745e8456..fde5bf0b34 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -217,16 +217,15 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
protected:
/* 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;
- Gtk::DrawingArea resizer;
- Gtk::HBox resizer_box;
- Gtk::HBox name_hbox;
- Gtk::Frame name_frame;
+ Gtk::HBox controls_hbox;
+ Gtk::Table controls_table;
+ Gtk::EventBox controls_ebox;
+ Gtk::VBox controls_vbox;
+ Gtk::VBox time_axis_vbox;
+ Gtk::DrawingArea resizer;
+ Gtk::HBox resizer_box;
+ Gtk::HBox name_hbox;
+ Gtk::Frame name_frame;
Gtkmm2ext::FocusEntry name_entry;
uint32_t height; /* in canvas units */
@@ -326,7 +325,7 @@ private:
void compute_heights ();
static uint32_t extra_height;
- static uint32_t smaller_height;
+ static uint32_t small_height;
static int const _max_order;