diff --git a/README.md b/README.md index ba02d089..cff5ae2e 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Minimum is 0.1 and maximum to 99.99. The bindings are: - Mouse left-button, wheel and key up/down step size is 0.1 - Holding Shift will switch to 0.01 step size +- Holding Ctrl will switch to 1.0 step size - Mouse middle-button and page up/page down step size is 1.0 - Mouse right-button jumps to minimum/maximum diff --git a/src/ui/toolbars.rs b/src/ui/toolbars.rs index fbbdda45..7dd42028 100644 --- a/src/ui/toolbars.rs +++ b/src/ui/toolbars.rs @@ -527,6 +527,7 @@ impl Component for StyleToolbar { 0.1, 99.99, // min, max 0.1, 1.0, // step sizes 0.0), + set_climb_rate: 0.1, set_numeric: true, set_digits: 2, set_width_chars: 4, @@ -547,13 +548,15 @@ impl Component for StyleToolbar { if matches!(keyval, Key::Shift_L | Key::Shift_R) { size_spin_button.adjustment().set_step_increment(0.01); + } else if matches!(keyval, Key::Control_L | Key::Control_R) { + size_spin_button.adjustment().set_step_increment(1.0); } relm4::gtk::glib::Propagation::Proceed }, connect_key_released[size_spin_button] => move |_, keyval, _, _| { - if matches!(keyval, Key::Shift_L | Key::Shift_R) { + if matches!(keyval, Key::Shift_L | Key::Shift_R| Key::Control_L | Key::Control_R) { size_spin_button.adjustment().set_step_increment(0.1); } },