mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 16:48:12 +08:00
Rename "options/top bar" terminology to "control bar" and update comments
This commit is contained in:
@@ -275,10 +275,10 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
|
||||
let data_buffer: RawBuffer = Self::default().serialize_root();
|
||||
responses.add(FrontendMessage::UpdateDocumentLayerStructure { data_buffer });
|
||||
|
||||
// Clear the options bar
|
||||
// Clear the control bar
|
||||
responses.add(LayoutMessage::SendLayout {
|
||||
layout: Layout::WidgetLayout(Default::default()),
|
||||
layout_target: LayoutTarget::LayersPanelOptions,
|
||||
layout_target: LayoutTarget::LayersPanelControlBar,
|
||||
});
|
||||
}
|
||||
DocumentMessage::InsertBooleanOperation { operation } => {
|
||||
@@ -350,7 +350,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageData<'_>> for DocumentMessag
|
||||
DocumentMessage::DocumentHistoryBackward => self.undo_with_history(ipp, responses),
|
||||
DocumentMessage::DocumentHistoryForward => self.redo_with_history(ipp, responses),
|
||||
DocumentMessage::DocumentStructureChanged => {
|
||||
self.update_layers_panel_options_bar_widgets(responses);
|
||||
self.update_layers_panel_control_bar_widgets(responses);
|
||||
|
||||
self.network_interface.load_structure();
|
||||
let data_buffer: RawBuffer = self.serialize_root();
|
||||
@@ -1901,7 +1901,7 @@ impl DocumentMessageHandler {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn update_layers_panel_options_bar_widgets(&self, responses: &mut VecDeque<Message>) {
|
||||
pub fn update_layers_panel_control_bar_widgets(&self, responses: &mut VecDeque<Message>) {
|
||||
// Get an iterator over the selected layers (excluding artboards which don't have an opacity or blend mode).
|
||||
let selected_nodes = self.network_interface.selected_nodes(&[]).unwrap();
|
||||
let selected_layers_except_artboards = selected_nodes.selected_layers_except_artboards(&self.network_interface);
|
||||
@@ -1969,7 +1969,7 @@ impl DocumentMessageHandler {
|
||||
.selected_layers(self.metadata())
|
||||
.all(|layer| self.network_interface.is_locked(&layer.to_node(), &[]));
|
||||
|
||||
let layers_panel_options_bar = WidgetLayout::new(vec![LayoutGroup::Row {
|
||||
let layers_panel_control_bar = WidgetLayout::new(vec![LayoutGroup::Row {
|
||||
widgets: vec![
|
||||
DropdownInput::new(blend_mode_menu_entries)
|
||||
.selected_index(blend_mode.and_then(|blend_mode| blend_mode.index_in_list_svg_subset()).map(|index| index as u32))
|
||||
@@ -2037,8 +2037,8 @@ impl DocumentMessageHandler {
|
||||
}]);
|
||||
|
||||
responses.add(LayoutMessage::SendLayout {
|
||||
layout: Layout::WidgetLayout(layers_panel_options_bar),
|
||||
layout_target: LayoutTarget::LayersPanelOptions,
|
||||
layout: Layout::WidgetLayout(layers_panel_control_bar),
|
||||
layout_target: LayoutTarget::LayersPanelControlBar,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2295,7 +2295,7 @@ impl Iterator for ClickXRayIter<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Eventually remove this (probably starting late 2024)
|
||||
// TODO: Eventually remove this document upgrade code
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub struct OldDocumentMessageHandler {
|
||||
// ============================================
|
||||
|
||||
@@ -1637,11 +1637,11 @@ impl NodeGraphMessageHandler {
|
||||
common
|
||||
}
|
||||
|
||||
/// Send the cached layout to the frontend for the options bar at the top of the node panel
|
||||
/// Send the cached layout to the frontend for the control bar at the top of the node panel
|
||||
fn send_node_bar_layout(&self, responses: &mut VecDeque<Message>) {
|
||||
responses.add(LayoutMessage::SendLayout {
|
||||
layout: Layout::WidgetLayout(WidgetLayout::new(self.widgets.to_vec())),
|
||||
layout_target: LayoutTarget::NodeGraphBar,
|
||||
layout_target: LayoutTarget::NodeGraphControlBar,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3311,7 +3311,7 @@ impl NodeNetworkInterface {
|
||||
node.implementation = implementation;
|
||||
}
|
||||
|
||||
// TODO: Eventually remove this (probably starting late 2024)
|
||||
// TODO: Eventually remove this document upgrade code
|
||||
/// Keep metadata in sync with the new implementation if this is used by anything other than the upgrade scripts
|
||||
pub fn replace_implementation_metadata(&mut self, node_id: &NodeId, network_path: &[NodeId], metadata: DocumentNodePersistentMetadata) {
|
||||
let Some(network_metadata) = self.network_metadata_mut(network_path) else {
|
||||
|
||||
Reference in New Issue
Block a user