@@ -163,7 +163,7 @@ pub fn window_main(renderer: Arc<Mutex<FractalRenderer>>) -> impl Widget<Fractal
163163 . with_child ( Flex :: row ( )
164164 . with_child ( Label :: new ( "Pattern Zoom: " ) . with_text_size ( 14.0 ) )
165165 . with_flex_child ( Slider :: new ( )
166- . with_range ( - 1 .0, 4.0 ) . expand_width ( )
166+ . with_range ( 0 .0, 4.0 ) . expand_width ( )
167167 . lens ( FractalData :: root_zoom_factor. map (
168168 |val| ( 1.0 / ( 1.0 - val) ) . log2 ( ) ,
169169 |val, new| * val = 1.0 - ( 1.0 / 2.0_f64 . powf ( new. round ( ) ) ) ) ) , 1.0 )
@@ -217,12 +217,12 @@ pub fn window_main(renderer: Arc<Mutex<FractalRenderer>>) -> impl Widget<Fractal
217217 } ;
218218 } ) . lens ( FractalData :: mouse_mode) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 )
219219 . with_spacer ( 4.0 )
220- . with_flex_child ( Button :: new ( "CENTRAL OUT" ) . on_click ( |ctx, _data : & mut FractalData , _env| {
221- ctx. submit_command ( MULTIPLY_PATTERN . with ( - 1.0 ) ) ;
220+ . with_flex_child ( Button :: new ( "CENTRAL OUT" ) . on_click ( |ctx, data : & mut FractalData , _env| {
221+ ctx. submit_command ( MULTIPLY_PATTERN . with ( 1.0 - 1.0 / ( 1.0 - data . root_zoom_factor ) ) ) ;
222222 } ) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 )
223223 . with_spacer ( 4.0 )
224- . with_flex_child ( Button :: new ( "CENTRAL IN" ) . on_click ( |ctx, _data : & mut FractalData , _env| {
225- ctx. submit_command ( MULTIPLY_PATTERN . with ( 0.5 ) ) ;
224+ . with_flex_child ( Button :: new ( "CENTRAL IN" ) . on_click ( |ctx, data : & mut FractalData , _env| {
225+ ctx. submit_command ( MULTIPLY_PATTERN . with ( data . root_zoom_factor ) ) ;
226226 } ) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 ) ) ;
227227
228228 let group_palette = Flex :: column ( )
0 commit comments