Editor zooming:
authorBen Loftis <ben@harrisonconsoles.com>
Sun, 27 Aug 2017 03:19:04 +0000 (22:19 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Sun, 27 Aug 2017 03:44:58 +0000 (22:44 -0500)
Add config setting for playhead-scroll-speed.
Default to 100% for now, but for new users we might later default it to something slower.
If you want to scroll quickly, it is preferred to zoom out first, then scroll.

gtk2_ardour/editor_canvas.cc
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/ui_config_vars.h

index 43b97a36f7fb928244b017ccad8aaea66f5cb310..565dbf0b784bdc289b9ce016e8a74611d056f1c7 100644 (file)
@@ -652,7 +652,7 @@ Editor::autoscroll_canvas ()
 
                        dx = pixel_to_sample (dx);
                        
-                       dx /= 10;  //ToDo:  make a config variable for scroll speed  zoom-behavior-tweaks
+                       dx *= UIConfiguration::instance().get_draggable_playhead_speed();
 
                        if (leftmost_frame < max_framepos - dx) {
                                new_frame = leftmost_frame + dx;
@@ -669,7 +669,7 @@ Editor::autoscroll_canvas ()
 
                        dx = pixel_to_sample (dx);
 
-                       dx /= 10;  //ToDo:  make a config variable for scroll speed  zoom-behavior-tweaks
+                       dx *= UIConfiguration::instance().get_draggable_playhead_speed();
 
                        if (leftmost_frame >= dx) {
                                new_frame = leftmost_frame - dx;
index 91ceba039eeaf2ce632c0f4a829a300e8e7c7fe5..ea7db58809e6d3b5a33083af1764885ad61257a0 100644 (file)
@@ -2332,6 +2332,19 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead)
                     ));
 
+       ComboOption<float>* dps = new ComboOption<float> (
+                    "draggable-playhead-speed",
+                    _("Playhead dragging speed (%)"),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_draggable_playhead_speed),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead_speed)
+                    );
+       dps->add (0.05, _("5%"));
+       dps->add (0.1, _("10%"));
+       dps->add (0.25, _("25%"));
+       dps->add (0.5, _("50%"));
+       dps->add (1.0, _("100%"));
+       add_option (_("Editor"), dps);
+
        if (!Profile->get_mixbus()) {
 
                add_option (_("Editor"),
index bbefc91b01597790b5a2d38a91d456f7197814be..0bf9a2c15a134186c6a10cbace2004c826b475d6 100644 (file)
@@ -32,6 +32,7 @@ UI_CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-
 UI_CONFIG_VARIABLE (bool, show_waveform_clipping, "show-waveform-clipping", true)
 UI_CONFIG_VARIABLE (uint32_t, lock_gui_after_seconds, "lock-gui-after-seconds", 0)
 UI_CONFIG_VARIABLE (bool, draggable_playhead, "draggable-playhead", true)
+UI_CONFIG_VARIABLE (float, draggable_playhead_speed, "draggable-playhead-speed", 1.0)
 UI_CONFIG_VARIABLE (bool, new_automation_points_on_lane, "new-automation-points-on-lane", false)
 UI_CONFIG_VARIABLE (std::string, keyboard_layout, "keyboard-layout", "ansi")
 UI_CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi")