View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002768 | ardour | features | public | 2009-07-05 22:54 | 2020-04-19 20:14 |
| Reporter | lincoln | Assigned To | paul | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0002768: Global buttons for editor track resizing | ||||
| Description | I am putting up a small patch that implements a crude track header resize very much like the editor zoom bottons. There are performance issues when making tracks smaller and the headers shrink in size. Still it is a usefull thing to have and somebody who is better at GTK than me can sort out the issues quicker than me. | ||||
| Tags | No tags attached. | ||||
|
2009-07-05 22:54
|
track-height-zoom-buttons.patch (4,530 bytes)
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc (revision 5331)
+++ gtk2_ardour/editor_ops.cc (working copy)
@@ -1523,7 +1523,18 @@
}
/* ZOOM */
+void
+Editor::tav_zoom_step (bool coarser)
+{
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::temporal_zoom_step), coarser));
+ for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
+ TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
+ tv->step_height (coarser);
+ }
+}
+
+
void
Editor::temporal_zoom_step (bool coarser)
{
Index: gtk2_ardour/editor.cc
===================================================================
@@ -2902,19 +2937,19 @@
zoom_box.set_border_width (0);
zoom_in_button.set_name ("EditorTimeButton");
- zoom_in_button.set_size_request(-1,16);
+ zoom_in_button.set_size_request(-1,20);
zoom_in_button.add (*(manage (new Image (::get_icon("zoom_in")))));
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom In"));
zoom_out_button.set_name ("EditorTimeButton");
- zoom_out_button.set_size_request(-1,16);
+ zoom_out_button.set_size_request(-1,20);
zoom_out_button.add (*(manage (new Image (::get_icon("zoom_out")))));
zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_button, _("Zoom Out"));
zoom_out_full_button.set_name ("EditorTimeButton");
- zoom_out_full_button.set_size_request(-1,16);
+ zoom_out_full_button.set_size_request(-1,20);
zoom_out_full_button.add (*(manage (new Image (::get_icon("zoom_full")))));
zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session"));
@@ -2924,9 +2959,24 @@
zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus"));
+ tav_expand_button.set_name ("EditorTimeButton");
+ tav_expand_button.set_size_request(-1,20);
+ tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp")))));
+ tav_expand_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), true));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_expand_button, _("Expand Tracks"));
+
+ tav_shrink_button.set_name ("EditorTimeButton");
+ tav_shrink_button.set_size_request(-1,20);
+ tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink")))));
+ tav_shrink_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), false));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_shrink_button, _("Shrink Tracks"));
+
+
zoom_box.pack_start (zoom_out_button, false, false);
zoom_box.pack_start (zoom_in_button, false, false);
zoom_box.pack_start (zoom_out_full_button, false, false);
+ zoom_box.pack_start (tav_expand_button, false, false);
+ zoom_box.pack_start (tav_shrink_button, false, false);
HBox* zbc = manage (new HBox);
zbc->pack_start (zoom_focus_selector, PACK_SHRINK);
Index: gtk2_ardour/editor.h
===================================================================
--- gtk2_ardour/editor.h (revision 5331)
+++ gtk2_ardour/editor.h (working copy)
@@ -307,8 +307,9 @@
void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
double get_current_zoom () const { return frames_per_unit; }
-
+
void temporal_zoom_step (bool coarser);
+ void tav_zoom_step (bool coarser);
/* stuff that AudioTimeAxisView and related classes use */
@@ -1503,6 +1504,9 @@
Gtk::Button zoom_out_full_button;
Gtk::Button zoom_onetoone_button;
+ Gtk::Button tav_expand_button;
+ Gtk::Button tav_shrink_button;
+
Gtk::VBox toolbar_clock_vbox;
Gtk::VBox toolbar_selection_clock_vbox;
Gtk::Table toolbar_selection_clock_table;
@@ -1993,7 +1997,7 @@
void select_next_route ();
void select_prev_route ();
- void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to_internal (nframes64_t& first, nframes64_t& last, int32_t direction = 0, bool for_mark = false);
RhythmFerret* rhythm_ferret;
BundleManager* _bundle_manager;
|
|
2009-07-05 22:56
|
|
|
2009-07-05 22:56
|
|
|
|
pngs should be added to gtk2_ardour/icons |
|
|
Assigning this to paul, but given the performance issues you mentioned I am not expecting it to be accepted without some cleanup at least. |
|
2009-07-05 23:42
|
track-height-zoom-buttons-2.patch (4,178 bytes)
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc (revision 5331)
+++ gtk2_ardour/editor_ops.cc (working copy)
@@ -1523,7 +1523,18 @@
}
/* ZOOM */
+void
+Editor::tav_zoom_step (bool coarser)
+{
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::temporal_zoom_step), coarser));
+ for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
+ TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
+ tv->step_height (coarser);
+ }
+}
+
+
void
Editor::temporal_zoom_step (bool coarser)
{
Index: gtk2_ardour/editor.cc
===================================================================
@@ -2902,19 +2937,19 @@
zoom_box.set_border_width (0);
zoom_in_button.set_name ("EditorTimeButton");
- zoom_in_button.set_size_request(-1,16);
+ zoom_in_button.set_size_request(-1,20);
zoom_in_button.add (*(manage (new Image (::get_icon("zoom_in")))));
zoom_in_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_in_button, _("Zoom In"));
zoom_out_button.set_name ("EditorTimeButton");
- zoom_out_button.set_size_request(-1,16);
+ zoom_out_button.set_size_request(-1,20);
zoom_out_button.add (*(manage (new Image (::get_icon("zoom_out")))));
zoom_out_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_button, _("Zoom Out"));
zoom_out_full_button.set_name ("EditorTimeButton");
- zoom_out_full_button.set_size_request(-1,16);
+ zoom_out_full_button.set_size_request(-1,20);
zoom_out_full_button.add (*(manage (new Image (::get_icon("zoom_full")))));
zoom_out_full_button.signal_clicked().connect (mem_fun(*this, &Editor::temporal_zoom_session));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_out_full_button, _("Zoom to Session"));
@@ -2924,9 +2959,24 @@
zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done));
ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus"));
+ tav_expand_button.set_name ("EditorTimeButton");
+ tav_expand_button.set_size_request(-1,20);
+ tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp")))));
+ tav_expand_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), true));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_expand_button, _("Expand Tracks"));
+
+ tav_shrink_button.set_name ("EditorTimeButton");
+ tav_shrink_button.set_size_request(-1,20);
+ tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink")))));
+ tav_shrink_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), false));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_shrink_button, _("Shrink Tracks"));
+
+
zoom_box.pack_start (zoom_out_button, false, false);
zoom_box.pack_start (zoom_in_button, false, false);
zoom_box.pack_start (zoom_out_full_button, false, false);
+ zoom_box.pack_start (tav_expand_button, false, false);
+ zoom_box.pack_start (tav_shrink_button, false, false);
HBox* zbc = manage (new HBox);
zbc->pack_start (zoom_focus_selector, PACK_SHRINK);
Index: gtk2_ardour/editor.h
===================================================================
--- gtk2_ardour/editor.h (revision 5331)
+++ gtk2_ardour/editor.h (working copy)
@@ -307,8 +307,9 @@
void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
double get_current_zoom () const { return frames_per_unit; }
-
+
void temporal_zoom_step (bool coarser);
+ void tav_zoom_step (bool coarser);
/* stuff that AudioTimeAxisView and related classes use */
@@ -1503,6 +1504,9 @@
Gtk::Button zoom_out_full_button;
Gtk::Button zoom_onetoone_button;
+ Gtk::Button tav_expand_button;
+ Gtk::Button tav_shrink_button;
+
Gtk::VBox toolbar_clock_vbox;
Gtk::VBox toolbar_selection_clock_vbox;
Gtk::Table toolbar_selection_clock_table;
|
|
|
Please ignore first patch. |
|
2009-07-27 04:56
|
editor-track-height-buttons.patch (3,884 bytes)
Index: gtk2_ardour/editor_ops.cc
===================================================================
--- gtk2_ardour/editor_ops.cc (revision 5424)
+++ gtk2_ardour/editor_ops.cc (working copy)
@@ -1523,7 +1523,22 @@
}
/* ZOOM */
+void
+Editor::tav_zoom_step (bool coarser)
+{
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::temporal_zoom_step), coarser));
+
+ _routes->suspend_redisplay ();
+ for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
+ TimeAxisView *tv = (static_cast<TimeAxisView*>(*i));
+ tv->step_height (coarser);
+ }
+
+ _routes->resume_redisplay ();
+}
+
+
void
Editor::temporal_zoom_step (bool coarser)
{
Index: gtk2_ardour/editor.cc
===================================================================
--- gtk2_ardour/editor.cc (revision 5424)
+++ gtk2_ardour/editor.cc (working copy)
@@ -2932,11 +2967,32 @@
zoom_box.pack_start (zoom_in_button, false, false);
zoom_box.pack_start (zoom_out_full_button, false, false);
+ /* Track zoom buttons */
+ tav_expand_button.set_name ("TrackHeightButton");
+ tav_expand_button.set_size_request(-1,20);
+ tav_expand_button.add (*(manage (new Image (::get_icon("tav_exp")))));
+ tav_expand_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), true));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_expand_button, _("Expand Tracks"));
+
+ tav_shrink_button.set_name ("TrackHeightButton");
+ tav_shrink_button.set_size_request(-1,20);
+ tav_shrink_button.add (*(manage (new Image (::get_icon("tav_shrink")))));
+ tav_shrink_button.signal_clicked().connect (bind (mem_fun(*this, &Editor::tav_zoom_step), false));
+ ARDOUR_UI::instance()->tooltips().set_tip (tav_shrink_button, _("Shrink Tracks"));
+
+ track_zoom_box.set_spacing (1);
+ track_zoom_box.set_border_width (0);
+
+ track_zoom_box.pack_start (tav_shrink_button, false, false);
+ track_zoom_box.pack_start (tav_expand_button, false, false);
+
HBox* zbc = manage (new HBox);
- zbc->pack_start (zoom_focus_selector, PACK_SHRINK);
+ zbc->pack_start (zoom_focus_selector, PACK_SHRINK);
+
zoom_vbox.pack_start (*zbc, PACK_SHRINK);
zoom_vbox.pack_start (zoom_box, PACK_SHRINK);
-
+ zoom_vbox.pack_start (track_zoom_box, PACK_SHRINK);
+
snap_box.set_spacing (1);
snap_box.set_border_width (2);
Index: gtk2_ardour/time_axis_view.cc
===================================================================
--- gtk2_ardour/time_axis_view.cc (revision 5424)
+++ gtk2_ardour/time_axis_view.cc (working copy)
@@ -133,6 +133,7 @@
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);
Index: gtk2_ardour/editor.h
===================================================================
--- gtk2_ardour/editor.h (revision 5424)
+++ gtk2_ardour/editor.h (working copy)
@@ -307,8 +307,9 @@
void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
double get_current_zoom () const { return frames_per_unit; }
-
+
void temporal_zoom_step (bool coarser);
+ void tav_zoom_step (bool coarser);
/* stuff that AudioTimeAxisView and related classes use */
@@ -1506,6 +1507,9 @@
Gtk::Button zoom_out_full_button;
Gtk::Button zoom_onetoone_button;
+ Gtk::Button tav_expand_button;
+ Gtk::Button tav_shrink_button;
+
Gtk::VBox toolbar_clock_vbox;
Gtk::VBox toolbar_selection_clock_vbox;
Gtk::Table toolbar_selection_clock_table;
@@ -1563,6 +1567,7 @@
Glib::RefPtr<Gtk::RadioAction> zoom_focus_action (Editing::ZoomFocus);
Gtk::HBox zoom_box;
+ Gtk::HBox track_zoom_box;
Gtk::VBox zoom_vbox;
void zoom_adjustment_changed();
|
|
|
Added new version of patch that addresses performance issue and keeps track header width fixed. |
|
|
Applied to SVN 3.0 rev 5587. Thanks very much! |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-07-05 22:54 | lincoln | New Issue | |
| 2009-07-05 22:54 | lincoln | File Added: track-height-zoom-buttons.patch | |
| 2009-07-05 22:56 | lincoln | File Added: tav_exp.png | |
| 2009-07-05 22:56 | lincoln | File Added: tav_shrink.png | |
| 2009-07-05 22:57 | lincoln | Note Added: 0006357 | |
| 2009-07-05 23:22 | seablade | Status | new => assigned |
| 2009-07-05 23:22 | seablade | Assigned To | => paul |
| 2009-07-05 23:22 | seablade | Note Added: 0006363 | |
| 2009-07-05 23:42 | lincoln | File Added: track-height-zoom-buttons-2.patch | |
| 2009-07-05 23:42 | lincoln | Note Added: 0006370 | |
| 2009-07-27 04:56 | lincoln | File Added: editor-track-height-buttons.patch | |
| 2009-07-27 04:57 | lincoln | Note Added: 0006470 | |
| 2009-08-24 22:28 | cth103 | cost | => 0.00 |
| 2009-08-24 22:28 | cth103 | Note Added: 0006597 | |
| 2009-08-24 22:28 | cth103 | Status | assigned => resolved |
| 2009-08-24 22:28 | cth103 | Resolution | open => fixed |
| 2020-04-19 20:14 | system | Note Added: 0021946 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |