@@ -150,23 +150,33 @@ impl Widget for &mut epaint::TessellationOptions {
150
150
validate_meshes,
151
151
} = self ;
152
152
153
- ui. checkbox ( feathering, "Feathering (antialias)" )
154
- . on_hover_text ( "Apply feathering to smooth out the edges of shapes. Turn off for small performance gain." ) ;
155
- let feathering_slider = crate :: Slider :: new ( feathering_size_in_pixels, 0.0 ..=10.0 )
156
- . smallest_positive ( 0.1 )
157
- . logarithmic ( true )
158
- . text ( "Feathering size in pixels" ) ;
159
- ui. add_enabled ( * feathering, feathering_slider) ;
153
+ ui. horizontal ( |ui| {
154
+ ui. checkbox ( feathering, "Feathering (antialias)" )
155
+ . on_hover_text ( "Apply feathering to smooth out the edges of shapes. Turn off for small performance gain." ) ;
156
+
157
+ if * feathering {
158
+ ui. add ( crate :: DragValue :: new ( feathering_size_in_pixels) . clamp_range ( 0.0 ..=10.0 ) . speed ( 0.1 ) . suffix ( " px" ) ) ;
159
+ }
160
+ } ) ;
160
161
161
162
ui. checkbox ( prerasterized_discs, "Speed up filled circles with pre-rasterization" ) ;
162
163
163
- ui. add (
164
- crate :: widgets:: Slider :: new ( bezier_tolerance, 0.0001 ..=10.0 )
165
- . logarithmic ( true )
166
- . show_value ( true )
167
- . text ( "Spline Tolerance" ) ,
168
- ) ;
169
- ui. collapsing ( "debug" , |ui| {
164
+ ui. horizontal ( |ui| {
165
+ ui. label ( "Spline tolerance" ) ;
166
+ let speed = 0.01 * * bezier_tolerance;
167
+ ui. add (
168
+ crate :: DragValue :: new ( bezier_tolerance) . clamp_range ( 0.0001 ..=10.0 )
169
+ . speed ( speed)
170
+ ) ;
171
+ } ) ;
172
+
173
+ ui. add_enabled ( epaint:: HAS_RAYON , crate :: Checkbox :: new ( parallel_tessellation, "Parallelize tessellation" )
174
+ ) . on_hover_text ( "Only available if epaint was compiled with the rayon feature" )
175
+ . on_disabled_hover_text ( "epaint was not compiled with the rayon feature" ) ;
176
+
177
+ ui. checkbox ( validate_meshes, "Validate meshes" ) . on_hover_text ( "Check that incoming meshes are valid, i.e. that all indices are in range, etc." ) ;
178
+
179
+ ui. collapsing ( "Debug" , |ui| {
170
180
ui. checkbox (
171
181
coarse_tessellation_culling,
172
182
"Do coarse culling in the tessellator" ,
@@ -178,12 +188,6 @@ impl Widget for &mut epaint::TessellationOptions {
178
188
ui. checkbox ( debug_paint_clip_rects, "Paint clip rectangles" ) ;
179
189
ui. checkbox ( debug_paint_text_rects, "Paint text bounds" ) ;
180
190
} ) ;
181
-
182
- ui. add_enabled ( epaint:: HAS_RAYON , crate :: Checkbox :: new ( parallel_tessellation, "Parallelize tessellation" )
183
- ) . on_hover_text ( "Only available if epaint was compiled with the rayon feature" )
184
- . on_disabled_hover_text ( "epaint was not compiled with the rayon feature" ) ;
185
-
186
- ui. checkbox ( validate_meshes, "Validate meshes" ) . on_hover_text ( "Check that incoming meshes are valid, i.e. that all indices are in range, etc." ) ;
187
191
} )
188
192
. response
189
193
}
0 commit comments