@@ -42,17 +42,18 @@ impl PreferencesDialogMessageHandler {
4242
4343 let navigation_header = vec ! [ TextLabel :: new( "Navigation" ) . italic( true ) . widget_holder( ) ] ;
4444
45- let zoom_rate_tooltip = "Adjust how fast zooming occurs when using the scroll wheel or pinch gesture (relative to a default of 50)" ;
45+ let zoom_rate_description = "Adjust how fast zooming occurs when using the scroll wheel or pinch gesture (relative to a default of 50). " ;
4646 let zoom_rate_label = vec ! [
4747 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
4848 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
49- TextLabel :: new( "Zoom Rate" ) . tooltip ( zoom_rate_tooltip ) . widget_holder( ) ,
49+ TextLabel :: new( "Zoom Rate" ) . tooltip_label ( "Zoom Rate" ) . tooltip_description ( zoom_rate_description ) . widget_holder( ) ,
5050 ] ;
5151 let zoom_rate = vec ! [
5252 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
5353 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
5454 NumberInput :: new( Some ( map_zoom_rate_to_display( preferences. viewport_zoom_wheel_rate) ) )
55- . tooltip( zoom_rate_tooltip)
55+ . tooltip_label( "Zoom Rate" )
56+ . tooltip_description( zoom_rate_description)
5657 . mode_range( )
5758 . int( )
5859 . min( 1. )
@@ -69,12 +70,13 @@ impl PreferencesDialogMessageHandler {
6970 ] ;
7071
7172 let checkbox_id = CheckboxId :: new ( ) ;
72- let zoom_with_scroll_tooltip = "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads)" ;
73+ let zoom_with_scroll_description = "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads). " ;
7374 let zoom_with_scroll = vec ! [
7475 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
7576 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
7677 CheckboxInput :: new( preferences. zoom_with_scroll)
77- . tooltip( zoom_with_scroll_tooltip)
78+ . tooltip_label( "Zoom with Scroll" )
79+ . tooltip_description( zoom_with_scroll_description)
7880 . on_update( |checkbox_input: & CheckboxInput | {
7981 PreferencesMessage :: ModifyLayout {
8082 zoom_with_scroll: checkbox_input. checked,
@@ -84,9 +86,10 @@ impl PreferencesDialogMessageHandler {
8486 . for_label( checkbox_id)
8587 . widget_holder( ) ,
8688 TextLabel :: new( "Zoom with Scroll" )
87- . table_align ( true )
88- . tooltip ( zoom_with_scroll_tooltip )
89+ . tooltip_label ( "Zoom with Scroll" )
90+ . tooltip_description ( zoom_with_scroll_description )
8991 . for_checkbox( checkbox_id)
92+ . table_align( true )
9093 . widget_holder( ) ,
9194 ] ;
9295
@@ -105,7 +108,8 @@ impl PreferencesDialogMessageHandler {
105108 let selection_mode = RadioInput :: new ( vec ! [
106109 RadioEntryData :: new( SelectionMode :: Touched . to_string( ) )
107110 . label( SelectionMode :: Touched . to_string( ) )
108- . tooltip( SelectionMode :: Touched . tooltip_description( ) )
111+ . tooltip_label( SelectionMode :: Touched . to_string( ) )
112+ . tooltip_description( SelectionMode :: Touched . tooltip_description( ) )
109113 . on_update( move |_| {
110114 PreferencesMessage :: SelectionMode {
111115 selection_mode: SelectionMode :: Touched ,
@@ -114,7 +118,8 @@ impl PreferencesDialogMessageHandler {
114118 } ) ,
115119 RadioEntryData :: new( SelectionMode :: Enclosed . to_string( ) )
116120 . label( SelectionMode :: Enclosed . to_string( ) )
117- . tooltip( SelectionMode :: Enclosed . tooltip_description( ) )
121+ . tooltip_label( SelectionMode :: Enclosed . to_string( ) )
122+ . tooltip_description( SelectionMode :: Enclosed . tooltip_description( ) )
118123 . on_update( move |_| {
119124 PreferencesMessage :: SelectionMode {
120125 selection_mode: SelectionMode :: Enclosed ,
@@ -123,7 +128,8 @@ impl PreferencesDialogMessageHandler {
123128 } ) ,
124129 RadioEntryData :: new( SelectionMode :: Directional . to_string( ) )
125130 . label( SelectionMode :: Directional . to_string( ) )
126- . tooltip( SelectionMode :: Directional . tooltip_description( ) )
131+ . tooltip_label( SelectionMode :: Directional . to_string( ) )
132+ . tooltip_description( SelectionMode :: Directional . tooltip_description( ) )
127133 . on_update( move |_| {
128134 PreferencesMessage :: SelectionMode {
129135 selection_mode: SelectionMode :: Directional ,
@@ -145,20 +151,25 @@ impl PreferencesDialogMessageHandler {
145151
146152 let experimental_header = vec ! [ TextLabel :: new( "Experimental" ) . italic( true ) . widget_holder( ) ] ;
147153
148- let node_graph_section_tooltip = "Appearance of the wires running between node connections in the graph" ;
154+ let node_graph_section_description = "Appearance of the wires running between node connections in the graph. " ;
149155 let node_graph_wires_label = vec ! [
150156 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
151157 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
152- TextLabel :: new( "Node Graph Wires" ) . tooltip( node_graph_section_tooltip) . widget_holder( ) ,
158+ TextLabel :: new( "Node Graph Wires" )
159+ . tooltip_label( "Node Graph Wires" )
160+ . tooltip_description( node_graph_section_description)
161+ . widget_holder( ) ,
153162 ] ;
154163 let graph_wire_style = RadioInput :: new ( vec ! [
155164 RadioEntryData :: new( GraphWireStyle :: Direct . to_string( ) )
156165 . label( GraphWireStyle :: Direct . to_string( ) )
157- . tooltip( GraphWireStyle :: Direct . tooltip_description( ) )
166+ . tooltip_label( GraphWireStyle :: Direct . to_string( ) )
167+ . tooltip_description( GraphWireStyle :: Direct . tooltip_description( ) )
158168 . on_update( move |_| PreferencesMessage :: GraphWireStyle { style: GraphWireStyle :: Direct } . into( ) ) ,
159169 RadioEntryData :: new( GraphWireStyle :: GridAligned . to_string( ) )
160170 . label( GraphWireStyle :: GridAligned . to_string( ) )
161- . tooltip( GraphWireStyle :: GridAligned . tooltip_description( ) )
171+ . tooltip_label( GraphWireStyle :: GridAligned . to_string( ) )
172+ . tooltip_description( GraphWireStyle :: GridAligned . tooltip_description( ) )
162173 . on_update( move |_| PreferencesMessage :: GraphWireStyle { style: GraphWireStyle :: GridAligned } . into( ) ) ,
163174 ] )
164175 . selected_index ( Some ( preferences. graph_wire_style as u32 ) )
@@ -170,36 +181,47 @@ impl PreferencesDialogMessageHandler {
170181 ] ;
171182
172183 let checkbox_id = CheckboxId :: new ( ) ;
173- let vello_tooltip = "Use the experimental Vello renderer (your browser must support WebGPU)" ;
184+ let vello_description = "Use the experimental Vello renderer. (Your browser must support WebGPU). " ;
174185 let use_vello = vec ! [
175186 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
176187 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
177188 CheckboxInput :: new( preferences. use_vello && preferences. supports_wgpu( ) )
178- . tooltip( vello_tooltip)
189+ . tooltip_label( "Vello Renderer" )
190+ . tooltip_description( vello_description)
179191 . disabled( !preferences. supports_wgpu( ) )
180192 . on_update( |checkbox_input: & CheckboxInput | PreferencesMessage :: UseVello { use_vello: checkbox_input. checked } . into( ) )
181193 . for_label( checkbox_id)
182194 . widget_holder( ) ,
183195 TextLabel :: new( "Vello Renderer" )
184- . table_align ( true )
185- . tooltip ( vello_tooltip )
196+ . tooltip_label ( "Vello Renderer" )
197+ . tooltip_description ( vello_description )
186198 . disabled( !preferences. supports_wgpu( ) )
187199 . for_checkbox( checkbox_id)
200+ . table_align( true )
188201 . widget_holder( ) ,
189202 ] ;
190203
191204 let checkbox_id = CheckboxId :: new ( ) ;
192- let vector_mesh_tooltip =
193- "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 stroke joins and fills." ;
205+ let vector_mesh_description = "
206+ Allow tools to produce vector meshes, where more than two segments can connect to an anchor point.\n \
207+ Currently this does not properly handle stroke joins and fills.
208+ "
209+ . trim ( ) ;
194210 let vector_meshes = vec ! [
195211 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
196212 Separator :: new( SeparatorType :: Unrelated ) . widget_holder( ) ,
197213 CheckboxInput :: new( preferences. vector_meshes)
198- . tooltip( vector_mesh_tooltip)
214+ . tooltip_label( "Vector Meshes" )
215+ . tooltip_description( vector_mesh_description)
199216 . on_update( |checkbox_input: & CheckboxInput | PreferencesMessage :: VectorMeshes { enabled: checkbox_input. checked } . into( ) )
200217 . for_label( checkbox_id)
201218 . widget_holder( ) ,
202- TextLabel :: new( "Vector Meshes" ) . table_align( true ) . tooltip( vector_mesh_tooltip) . for_checkbox( checkbox_id) . widget_holder( ) ,
219+ TextLabel :: new( "Vector Meshes" )
220+ . tooltip_label( "Vector Meshes" )
221+ . tooltip_description( vector_mesh_description)
222+ . for_checkbox( checkbox_id)
223+ . table_align( true )
224+ . widget_holder( ) ,
203225 ] ;
204226
205227 Layout :: WidgetLayout ( WidgetLayout :: new ( vec ! [
0 commit comments