@@ -31,33 +31,34 @@ impl PreferencesDialogMessageHandler {
3131 const TITLE : & ' static str = "Editor Preferences" ;
3232
3333 fn layout ( & self , preferences : & PreferencesMessageHandler ) -> Layout {
34+ let zoom_with_scroll_tooltip = "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads)" ;
35+ let input_section = vec ! [ TextLabel :: new( "Input" ) . italic( true ) . widget_holder( ) ] ;
3436 let zoom_with_scroll = vec ! [
35- TextLabel :: new( "Input" ) . min_width( 60 ) . italic( true ) . widget_holder( ) ,
36- TextLabel :: new( "Zoom with Scroll" ) . table_align( true ) . widget_holder( ) ,
37- Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
3837 CheckboxInput :: new( preferences. zoom_with_scroll)
39- . tooltip( "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads)" )
38+ . tooltip( zoom_with_scroll_tooltip )
4039 . on_update( |checkbox_input: & CheckboxInput | {
4140 PreferencesMessage :: ModifyLayout {
4241 zoom_with_scroll: checkbox_input. checked,
4342 }
4443 . into( )
4544 } )
4645 . widget_holder( ) ,
46+ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
47+ TextLabel :: new( "Zoom with Scroll" ) . table_align( true ) . tooltip( zoom_with_scroll_tooltip) . widget_holder( ) ,
4748 ] ;
4849 let vello_tooltip = "Use the experimental Vello renderer (your browser must support WebGPU)" ;
50+ let renderer_section = vec ! [ TextLabel :: new( "Renderer" ) . italic( true ) . widget_holder( ) ] ;
4951 let use_vello = vec ! [
50- TextLabel :: new( "Renderer" ) . min_width( 60 ) . italic( true ) . widget_holder( ) ,
51- TextLabel :: new( "Vello (Experimental)" )
52- . table_align( true )
52+ CheckboxInput :: new( preferences. use_vello && preferences. supports_wgpu( ) )
5353 . tooltip( vello_tooltip)
5454 . disabled( !preferences. supports_wgpu( ) )
55+ . on_update( |checkbox_input: & CheckboxInput | PreferencesMessage :: UseVello { use_vello: checkbox_input. checked } . into( ) )
5556 . widget_holder( ) ,
5657 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
57- CheckboxInput :: new( preferences. use_vello && preferences. supports_wgpu( ) )
58+ TextLabel :: new( "Vello (Experimental)" )
59+ . table_align( true )
5860 . tooltip( vello_tooltip)
5961 . disabled( !preferences. supports_wgpu( ) )
60- . on_update( |checkbox_input: & CheckboxInput | PreferencesMessage :: UseVello { use_vello: checkbox_input. checked } . into( ) )
6162 . widget_holder( ) ,
6263 ] ;
6364
@@ -85,7 +86,9 @@ impl PreferencesDialogMessageHandler {
8586 // ];
8687
8788 Layout :: WidgetLayout ( WidgetLayout :: new ( vec ! [
89+ LayoutGroup :: Row { widgets: input_section } ,
8890 LayoutGroup :: Row { widgets: zoom_with_scroll } ,
91+ LayoutGroup :: Row { widgets: renderer_section } ,
8992 LayoutGroup :: Row { widgets: use_vello } ,
9093 // LayoutGroup::Row { widgets: imaginate_server_hostname },
9194 // LayoutGroup::Row { widgets: imaginate_refresh_frequency },
0 commit comments