@@ -33,13 +33,15 @@ impl PreferencesDialogMessageHandler {
3333 const TITLE : & ' static str = "Editor Preferences" ;
3434
3535 fn layout ( & self , preferences : & PreferencesMessageHandler ) -> Layout {
36- // =====
37- // INPUT
38- // =====
36+ // ==========
37+ // NAVIGATION
38+ // ==========
39+
40+ let navigation_header = vec ! [ TextLabel :: new( "Navigation" ) . italic( true ) . widget_holder( ) ] ;
3941
4042 let zoom_with_scroll_tooltip = "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads)" ;
41- let input_section = vec ! [ TextLabel :: new( "Input" ) . italic( true ) . widget_holder( ) ] ;
4243 let zoom_with_scroll = vec ! [
44+ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
4345 CheckboxInput :: new( preferences. zoom_with_scroll)
4446 . tooltip( zoom_with_scroll_tooltip)
4547 . on_update( |checkbox_input: & CheckboxInput | {
@@ -52,11 +54,14 @@ impl PreferencesDialogMessageHandler {
5254 TextLabel :: new( "Zoom with Scroll" ) . table_align( true ) . tooltip( zoom_with_scroll_tooltip) . widget_holder( ) ,
5355 ] ;
5456
55- // =========
56- // SELECTION
57- // =========
57+ // =======
58+ // EDITING
59+ // =======
60+
61+ let editing_header = vec ! [ TextLabel :: new( "Editing" ) . italic( true ) . widget_holder( ) ] ;
62+
63+ let selection_label = vec ! [ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) , TextLabel :: new( "Selection" ) . widget_holder( ) ] ;
5864
59- let selection_section = vec ! [ TextLabel :: new( "Selection" ) . italic( true ) . widget_holder( ) ] ;
6065 let selection_mode = RadioInput :: new ( vec ! [
6166 RadioEntryData :: new( SelectionMode :: Touched . to_string( ) )
6267 . label( SelectionMode :: Touched . to_string( ) )
@@ -89,32 +94,33 @@ impl PreferencesDialogMessageHandler {
8994 . selected_index ( Some ( preferences. selection_mode as u32 ) )
9095 . widget_holder ( ) ;
9196
92- // ================
93- // NODE GRAPH WIRES
94- // ================
97+ // ============
98+ // EXPERIMENTAL
99+ // ============
100+
101+ let experimental_header = vec ! [ TextLabel :: new( "Experimental" ) . italic( true ) . widget_holder( ) ] ;
95102
96103 let node_graph_section_tooltip = "Appearance of the wires running between node connections in the graph" ;
97- let node_graph_section = vec ! [ TextLabel :: new( "Node Graph Wires" ) . tooltip( node_graph_section_tooltip) . italic( true ) . widget_holder( ) ] ;
104+ let node_graph_wires_label = vec ! [
105+ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
106+ TextLabel :: new( "Node Graph Wires" ) . tooltip( node_graph_section_tooltip) . widget_holder( ) ,
107+ ] ;
98108 let graph_wire_style = RadioInput :: new ( vec ! [
99- RadioEntryData :: new( GraphWireStyle :: GridAligned . to_string( ) )
100- . label( GraphWireStyle :: GridAligned . to_string( ) )
101- . tooltip( GraphWireStyle :: GridAligned . tooltip_description( ) )
102- . on_update( move |_| PreferencesMessage :: GraphWireStyle { style: GraphWireStyle :: GridAligned } . into( ) ) ,
103109 RadioEntryData :: new( GraphWireStyle :: Direct . to_string( ) )
104110 . label( GraphWireStyle :: Direct . to_string( ) )
105111 . tooltip( GraphWireStyle :: Direct . tooltip_description( ) )
106112 . on_update( move |_| PreferencesMessage :: GraphWireStyle { style: GraphWireStyle :: Direct } . into( ) ) ,
113+ RadioEntryData :: new( GraphWireStyle :: GridAligned . to_string( ) )
114+ . label( GraphWireStyle :: GridAligned . to_string( ) )
115+ . tooltip( GraphWireStyle :: GridAligned . tooltip_description( ) )
116+ . on_update( move |_| PreferencesMessage :: GraphWireStyle { style: GraphWireStyle :: GridAligned } . into( ) ) ,
107117 ] )
108118 . selected_index ( Some ( preferences. graph_wire_style as u32 ) )
109119 . widget_holder ( ) ;
110120
111- // ============
112- // EXPERIMENTAL
113- // ============
114-
115121 let vello_tooltip = "Use the experimental Vello renderer (your browser must support WebGPU)" ;
116- let renderer_section = vec ! [ TextLabel :: new( "Experimental" ) . italic( true ) . widget_holder( ) ] ;
117122 let use_vello = vec ! [
123+ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
118124 CheckboxInput :: new( preferences. use_vello && preferences. supports_wgpu( ) )
119125 . tooltip( vello_tooltip)
120126 . disabled( !preferences. supports_wgpu( ) )
@@ -129,6 +135,7 @@ impl PreferencesDialogMessageHandler {
129135
130136 let vector_mesh_tooltip = "Allow tools to produce vector meshes, where more than two segments can connect to an anchor point.\n \n Currently this does not properly handle line joins and fills." ;
131137 let vector_meshes = vec ! [
138+ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
132139 CheckboxInput :: new( preferences. vector_meshes)
133140 . tooltip( vector_mesh_tooltip)
134141 . on_update( |checkbox_input: & CheckboxInput | PreferencesMessage :: VectorMeshes { enabled: checkbox_input. checked } . into( ) )
@@ -158,13 +165,18 @@ impl PreferencesDialogMessageHandler {
158165 // ];
159166
160167 Layout :: WidgetLayout ( WidgetLayout :: new ( vec ! [
161- LayoutGroup :: Row { widgets: input_section } ,
168+ LayoutGroup :: Row { widgets: navigation_header } ,
162169 LayoutGroup :: Row { widgets: zoom_with_scroll } ,
163- LayoutGroup :: Row { widgets: selection_section } ,
164- LayoutGroup :: Row { widgets: vec![ selection_mode] } ,
165- LayoutGroup :: Row { widgets: node_graph_section } ,
166- LayoutGroup :: Row { widgets: vec![ graph_wire_style] } ,
167- LayoutGroup :: Row { widgets: renderer_section } ,
170+ LayoutGroup :: Row { widgets: editing_header } ,
171+ LayoutGroup :: Row { widgets: selection_label } ,
172+ LayoutGroup :: Row {
173+ widgets: vec![ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) , selection_mode] ,
174+ } ,
175+ LayoutGroup :: Row { widgets: experimental_header } ,
176+ LayoutGroup :: Row { widgets: node_graph_wires_label } ,
177+ LayoutGroup :: Row {
178+ widgets: vec![ Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) , graph_wire_style] ,
179+ } ,
168180 LayoutGroup :: Row { widgets: use_vello } ,
169181 LayoutGroup :: Row { widgets: vector_meshes } ,
170182 // LayoutGroup::Row { widgets: imaginate_server_hostname },
0 commit comments