mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
[Summary] Implementing the wave zoom control in the transport bar
This commit is contained in:
parent
376b1f6975
commit
b1c6795601
8 changed files with 27 additions and 52 deletions
|
|
@ -260,6 +260,7 @@ Editor::Editor ()
|
|||
, _vertical_zoom_adjustment (get_adjustment ("vertical_zoom_adjustment"))
|
||||
, _vertical_zoom_fader (get_fader ("vertical_zoom_fader"))
|
||||
, vertical_adjustment (get_adjustment ("vertical_adjustment"))
|
||||
, _waves_zoom_control (get_adjustment ("waves_zoom_adjustment"))
|
||||
, horizontal_adjustment (get_adjustment ("horizontal_adjustment"))
|
||||
, unused_adjustment (get_adjustment ("unused_adjustment"))
|
||||
, edit_packer (get_table ("edit_packer"))
|
||||
|
|
@ -322,6 +323,8 @@ Editor::Editor ()
|
|||
get_container ("compact_meter_bridge_home").add (_compact_meter_bridge);
|
||||
get_container ("mixer_bridge_view_home").add (_mixer_bridge_view);
|
||||
get_container ("meter_bridge_view_home").add (_meter_bridge_view);
|
||||
get_container ("waves_zoom_control_home").add (_waves_zoom_control);
|
||||
_waves_zoom_control.show();
|
||||
|
||||
_have_idled = false;
|
||||
|
||||
|
|
@ -3070,43 +3073,15 @@ Editor::setup_toolbar ()
|
|||
|
||||
RefPtr<Action> act;
|
||||
|
||||
zoom_in_button.set_name ("zoom button");
|
||||
zoom_in_button.add_elements ( ArdourButton::Inset );
|
||||
zoom_in_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_in_button.set_image(::get_icon ("zoom_in"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-in"));
|
||||
zoom_in_button.set_related_action (act);
|
||||
|
||||
zoom_out_button.set_name ("zoom button");
|
||||
zoom_out_button.add_elements ( ArdourButton::Inset );
|
||||
zoom_out_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_out_button.set_image(::get_icon ("zoom_out"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-out"));
|
||||
zoom_out_button.set_related_action (act);
|
||||
|
||||
zoom_out_full_button.set_name ("zoom button");
|
||||
zoom_out_full_button.add_elements ( ArdourButton::Inset );
|
||||
zoom_out_full_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_out_full_button.set_image(::get_icon ("zoom_full"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("zoom-to-session"));
|
||||
zoom_out_full_button.set_related_action (act);
|
||||
|
||||
zoom_focus_selector.set_name ("ZoomFocusSelector");
|
||||
set_popdown_strings (zoom_focus_selector, zoom_focus_strings);
|
||||
zoom_focus_selector.signal_changed().connect (sigc::mem_fun(*this, &Editor::zoom_focus_selection_done));
|
||||
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
_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 (zoom_focus_selector, false, false);
|
||||
} else {
|
||||
_temporal_zoom_adjustment.signal_value_changed().connect (mem_fun (*this, &Editor::temporal_zoom_by_slider));
|
||||
_vertical_zoom_adjustment.signal_value_changed().connect (mem_fun (*this, &Editor::vertical_zoom_by_slider));
|
||||
ZoomChanged.connect (sigc::mem_fun (*this, &Editor::update_temporal_zoom_slider));
|
||||
_temporal_zoom_adjustment.signal_value_changed().connect (mem_fun (*this, &Editor::temporal_zoom_by_slider));
|
||||
_vertical_zoom_adjustment.signal_value_changed().connect (mem_fun (*this, &Editor::vertical_zoom_by_slider));
|
||||
ZoomChanged.connect (sigc::mem_fun (*this, &Editor::update_temporal_zoom_slider));
|
||||
|
||||
_vertical_zoom_fader.signal_button_press_event().connect (sigc::mem_fun(*this, &Editor::vertical_fader_pressed), false);
|
||||
}
|
||||
_vertical_zoom_fader.signal_button_press_event().connect (sigc::mem_fun(*this, &Editor::vertical_fader_pressed), false);
|
||||
|
||||
/* Track zoom buttons */
|
||||
visible_tracks_selector.set_name ("zoom button");
|
||||
|
|
@ -3311,10 +3286,6 @@ Editor::setup_tooltips ()
|
|||
ARDOUR_UI::instance()->set_tip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations"));
|
||||
ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Later"));
|
||||
ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Earlier"));
|
||||
ARDOUR_UI::instance()->set_tip (zoom_in_button, _("Zoom In"));
|
||||
ARDOUR_UI::instance()->set_tip (zoom_out_button, _("Zoom Out"));
|
||||
ARDOUR_UI::instance()->set_tip (zoom_out_full_button, _("Zoom to Session"));
|
||||
ARDOUR_UI::instance()->set_tip (zoom_focus_selector, _("Zoom focus"));
|
||||
ARDOUR_UI::instance()->set_tip (tav_expand_button, _("Expand Tracks"));
|
||||
ARDOUR_UI::instance()->set_tip (tav_shrink_button, _("Shrink Tracks"));
|
||||
ARDOUR_UI::instance()->set_tip (visible_tracks_selector, _("Number of visible tracks"));
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
#include "region_selection.h"
|
||||
#include "compact_meter_bridge.h"
|
||||
#include "mixer_bridge_view.h"
|
||||
#include "waves_zoom_control.h"
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
class TearOff;
|
||||
|
|
@ -1214,6 +1215,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void temporal_zoom_by_frame (framepos_t start, framepos_t end);
|
||||
void temporal_zoom_to_frame (bool coarser, framepos_t frame);
|
||||
void temporal_zoom_by_slider ();
|
||||
void wave_form_zoom ();
|
||||
void update_temporal_zoom_slider ();
|
||||
|
||||
void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
|
||||
|
|
@ -1590,10 +1592,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void editor_list_button_toggled ();
|
||||
|
||||
AudioClock* zoom_range_clock;
|
||||
|
||||
ArdourButton zoom_in_button;
|
||||
ArdourButton zoom_out_button;
|
||||
ArdourButton zoom_out_full_button;
|
||||
WavesZoomControl _waves_zoom_control;
|
||||
|
||||
ArdourButton tav_expand_button;
|
||||
ArdourButton tav_shrink_button;
|
||||
|
|
|
|||
BIN
gtk2_ardour/icons/wave_zoom_control.png
Normal file
BIN
gtk2_ardour/icons/wave_zoom_control.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
gtk2_ardour/icons/wave_zoom_control_decreasing_zoom.png
Normal file
BIN
gtk2_ardour/icons/wave_zoom_control_decreasing_zoom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
gtk2_ardour/icons/wave_zoom_control_increasing_zoom.png
Normal file
BIN
gtk2_ardour/icons/wave_zoom_control_increasing_zoom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
gtk2_ardour/icons/wave_zoom_control_sliding.png
Normal file
BIN
gtk2_ardour/icons/wave_zoom_control_sliding.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -4,18 +4,24 @@
|
|||
<VBox id="vpacker">
|
||||
<Adjustment id="vertical_adjustment"
|
||||
initial_value="0"
|
||||
min_value="0"
|
||||
max_value="10"
|
||||
minvalue="0"
|
||||
maxvalue="10"
|
||||
step="400"/>
|
||||
<Adjustment id="horizontal_adjustment"
|
||||
initial_value="0"
|
||||
min_value="0"
|
||||
max_value="10000000000000000"/>
|
||||
minvalue="0"
|
||||
maxvalue="10000000000000000"/>
|
||||
<Adjustment id="unused_adjustment"
|
||||
initial_value="0"
|
||||
min_value="0"
|
||||
max_value="10"
|
||||
minvalue="0"
|
||||
maxvalue="10"
|
||||
step="400"/>
|
||||
<Adjustment id="waves_zoom_adjustment"
|
||||
initial_value="0"
|
||||
minvalue="0"
|
||||
maxvalue="10"
|
||||
step="0.2"
|
||||
pagesize="2.0"/>
|
||||
<HBox id="menu_bar_base"/>
|
||||
<EventBox bgnormal="#000000">
|
||||
<VBox borderwidth="2" spacing ="1">
|
||||
|
|
@ -197,12 +203,10 @@
|
|||
minposy="13"
|
||||
maxposx="20"
|
||||
maxposy="13"/>
|
||||
<iconbutton id="tool_waveform_zoom_button"
|
||||
tooltip="Waveform Zoom"
|
||||
width="34" height="26"
|
||||
normalicon="tool_waveform_zoom"
|
||||
activeicon="tool_waveform_zoom_active"
|
||||
prelighticon="tool_waveform_zoom_prelight"/>
|
||||
<EventBox id="waves_zoom_control_home"
|
||||
tooltip="Waveform Zoom"
|
||||
width="48" height="26"
|
||||
bgnormal="#ffff00"/>
|
||||
<iconbutton id="media_button"
|
||||
tooltip="Media Button"
|
||||
width="48" height="26"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ path_prefix = 'gtk2_ardour/'
|
|||
|
||||
gtk2_ardour_sources = [
|
||||
'mixer_bridge_view.cc',
|
||||
'waves_zoom_control.cc',
|
||||
'waves_ui.cc',
|
||||
'waves_grid.cc',
|
||||
'about.cc',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue