@@ -3,7 +3,7 @@ use super::node_graph::utility_types::Transform;
3
3
use super :: overlays:: utility_types:: Pivot ;
4
4
use super :: utility_types:: clipboards:: Clipboard ;
5
5
use super :: utility_types:: error:: EditorError ;
6
- use super :: utility_types:: misc:: { SnappingOptions , SnappingState , GET_SNAP_BOX_FUNCTIONS , GET_SNAP_GEOMETRY_FUNCTIONS } ;
6
+ use super :: utility_types:: misc:: { SnappingOptions , SnappingState , SNAP_FUNCTIONS_FOR_BOUNDING_BOXES , SNAP_FUNCTIONS_FOR_PATHS } ;
7
7
use super :: utility_types:: network_interface:: { self , NodeNetworkInterface , TransactionStatus } ;
8
8
use super :: utility_types:: nodes:: { CollapsedLayers , SelectedNodes } ;
9
9
use crate :: application:: { generate_uuid, GRAPHITE_GIT_COMMIT_HASH } ;
@@ -1779,28 +1779,27 @@ impl DocumentMessageHandler {
1779
1779
} ,
1780
1780
]
1781
1781
. into_iter( )
1782
- . chain( GET_SNAP_BOX_FUNCTIONS . into_iter( ) . map( |( name, closure) | LayoutGroup :: Row {
1782
+ . chain( SNAP_FUNCTIONS_FOR_BOUNDING_BOXES . into_iter( ) . map( |( name, closure, tooltip ) | LayoutGroup :: Row {
1783
1783
widgets: vec![
1784
1784
CheckboxInput :: new( * closure( & mut snapping_state) )
1785
1785
. on_update( move |input: & CheckboxInput | DocumentMessage :: SetSnapping { closure: Some ( closure) , snapping_state: input. checked } . into( ) )
1786
+ . tooltip( tooltip)
1786
1787
. widget_holder( ) ,
1787
- TextLabel :: new( name) . widget_holder( ) ,
1788
+ TextLabel :: new( name) . tooltip ( tooltip ) . widget_holder( ) ,
1788
1789
] ,
1789
1790
} ) )
1790
- . chain(
1791
- [ LayoutGroup :: Row {
1792
- widgets: vec![ TextLabel :: new( SnappingOptions :: Geometry . to_string( ) ) . widget_holder( ) ] ,
1793
- } ]
1794
- . into_iter( )
1795
- . chain( GET_SNAP_GEOMETRY_FUNCTIONS . into_iter( ) . map( |( name, closure) | LayoutGroup :: Row {
1796
- widgets: vec![
1791
+ . chain( [ LayoutGroup :: Row {
1792
+ widgets: vec![ TextLabel :: new( SnappingOptions :: Paths . to_string( ) ) . widget_holder( ) ] ,
1793
+ } ] )
1794
+ . chain( SNAP_FUNCTIONS_FOR_PATHS . into_iter( ) . map( |( name, closure, tooltip) | LayoutGroup :: Row {
1795
+ widgets: vec![
1797
1796
CheckboxInput :: new( * closure( & mut snapping_state2) )
1798
1797
. on_update( move |input: & CheckboxInput | DocumentMessage :: SetSnapping { closure: Some ( closure) , snapping_state: input. checked } . into( ) )
1798
+ . tooltip( tooltip)
1799
1799
. widget_holder( ) ,
1800
- TextLabel :: new( name) . widget_holder( ) ,
1800
+ TextLabel :: new( name) . tooltip ( tooltip ) . widget_holder( ) ,
1801
1801
] ,
1802
- } ) ) ,
1803
- )
1802
+ } ) )
1804
1803
. collect( ) ,
1805
1804
)
1806
1805
. widget_holder( ) ,
0 commit comments