Reorganize the menu bar and add additional commands to it

This commit is contained in:
Keavon Chambers
2025-03-01 13:44:28 -08:00
parent fd81d043a2
commit ddb0c8c249
10 changed files with 337 additions and 99 deletions
@@ -41,6 +41,7 @@ impl PreferencesDialogMessageHandler {
let zoom_with_scroll_tooltip = "Use the scroll wheel for zooming instead of vertically panning (not recommended for trackpads)";
let zoom_with_scroll = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
CheckboxInput::new(preferences.zoom_with_scroll)
.tooltip(zoom_with_scroll_tooltip)
@@ -60,7 +61,11 @@ impl PreferencesDialogMessageHandler {
let editing_header = vec![TextLabel::new("Editing").italic(true).widget_holder()];
let selection_label = vec![Separator::new(SeparatorType::Unrelated).widget_holder(), TextLabel::new("Selection").widget_holder()];
let selection_label = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
TextLabel::new("Selection").widget_holder(),
];
let selection_mode = RadioInput::new(vec![
RadioEntryData::new(SelectionMode::Touched.to_string())
@@ -93,6 +98,11 @@ impl PreferencesDialogMessageHandler {
])
.selected_index(Some(preferences.selection_mode as u32))
.widget_holder();
let selection_mode = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
selection_mode,
];
// ============
// EXPERIMENTAL
@@ -102,6 +112,7 @@ impl PreferencesDialogMessageHandler {
let node_graph_section_tooltip = "Appearance of the wires running between node connections in the graph";
let node_graph_wires_label = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
TextLabel::new("Node Graph Wires").tooltip(node_graph_section_tooltip).widget_holder(),
];
@@ -117,9 +128,15 @@ impl PreferencesDialogMessageHandler {
])
.selected_index(Some(preferences.graph_wire_style as u32))
.widget_holder();
let graph_wire_style = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
graph_wire_style,
];
let vello_tooltip = "Use the experimental Vello renderer (your browser must support WebGPU)";
let use_vello = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
CheckboxInput::new(preferences.use_vello && preferences.supports_wgpu())
.tooltip(vello_tooltip)
@@ -135,6 +152,7 @@ impl PreferencesDialogMessageHandler {
let vector_mesh_tooltip = "Allow tools to produce vector meshes, where more than two segments can connect to an anchor point.\n\nCurrently this does not properly handle line joins and fills.";
let vector_meshes = vec![
Separator::new(SeparatorType::Unrelated).widget_holder(),
Separator::new(SeparatorType::Unrelated).widget_holder(),
CheckboxInput::new(preferences.vector_meshes)
.tooltip(vector_mesh_tooltip)
@@ -169,14 +187,10 @@ impl PreferencesDialogMessageHandler {
LayoutGroup::Row { widgets: zoom_with_scroll },
LayoutGroup::Row { widgets: editing_header },
LayoutGroup::Row { widgets: selection_label },
LayoutGroup::Row {
widgets: vec![Separator::new(SeparatorType::Unrelated).widget_holder(), selection_mode],
},
LayoutGroup::Row { widgets: selection_mode },
LayoutGroup::Row { widgets: experimental_header },
LayoutGroup::Row { widgets: node_graph_wires_label },
LayoutGroup::Row {
widgets: vec![Separator::new(SeparatorType::Unrelated).widget_holder(), graph_wire_style],
},
LayoutGroup::Row { widgets: graph_wire_style },
LayoutGroup::Row { widgets: use_vello },
LayoutGroup::Row { widgets: vector_meshes },
// LayoutGroup::Row { widgets: imaginate_server_hostname },