@@ -163,7 +163,7 @@ pub fn window_main(renderer: Arc<Mutex<FractalRenderer>>) -> impl Widget<Fractal
163
163
. with_child ( Flex :: row ( )
164
164
. with_child ( Label :: new ( "Pattern Zoom: " ) . with_text_size ( 14.0 ) )
165
165
. with_flex_child ( Slider :: new ( )
166
- . with_range ( - 1 .0, 4.0 ) . expand_width ( )
166
+ . with_range ( 0 .0, 4.0 ) . expand_width ( )
167
167
. lens ( FractalData :: root_zoom_factor. map (
168
168
|val| ( 1.0 / ( 1.0 - val) ) . log2 ( ) ,
169
169
|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
217
217
} ;
218
218
} ) . lens ( FractalData :: mouse_mode) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 )
219
219
. 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 ) ) ) ;
222
222
} ) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 )
223
223
. 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 ) ) ;
226
226
} ) . expand_width ( ) . fix_height ( 24.0 ) , 1.0 ) ) ;
227
227
228
228
let group_palette = Flex :: column ( )
0 commit comments