mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 19:28:12 +08:00
Add visibility and delete buttons to node sections in the Properties panel
This commit is contained in:
@@ -666,8 +666,12 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphHandlerData<'a>> for NodeGrap
|
||||
responses.add(NodeGraphMessage::RunDocumentGraph);
|
||||
}
|
||||
})();
|
||||
|
||||
document_metadata.load_structure(document_network, selected_nodes);
|
||||
|
||||
self.update_selection_action_buttons(document_network, document_metadata, selected_nodes, responses);
|
||||
|
||||
responses.add(PropertiesPanelMessage::Refresh);
|
||||
}
|
||||
NodeGraphMessage::ToggleSelectedLocked => {
|
||||
responses.add(DocumentMessage::StartTransaction);
|
||||
|
||||
@@ -2252,7 +2252,12 @@ pub fn generate_node_properties(document_node: &DocumentNode, node_id: NodeId, c
|
||||
Some(document_node_type) => (document_node_type.properties)(document_node, node_id, context),
|
||||
None => unknown_node_properties(document_node),
|
||||
};
|
||||
LayoutGroup::Section { name, layout }
|
||||
LayoutGroup::Section {
|
||||
name,
|
||||
visible: document_node.visible,
|
||||
id: node_id.0,
|
||||
layout,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stroke_properties(document_node: &DocumentNode, node_id: NodeId, _context: &mut NodePropertiesContext) -> Vec<LayoutGroup> {
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ impl<'a> MessageHandler<PropertiesPanelMessage, (&PersistentData, PropertiesPane
|
||||
|
||||
let options_bar = vec![LayoutGroup::Row {
|
||||
widgets: vec![
|
||||
IconLabel::new("File").tooltip("Document").widget_holder(),
|
||||
IconLabel::new("File").tooltip("Document name").widget_holder(),
|
||||
Separator::new(SeparatorType::Related).widget_holder(),
|
||||
TextInput::new(document_name)
|
||||
.on_update(|text_input| DocumentMessage::RenameDocument { new_name: text_input.value.clone() }.into())
|
||||
|
||||
Reference in New Issue
Block a user