mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 02:18:12 +08:00
Unwrap the Layout enum to replace it with the WidgetLayout struct now called Layout (#3448)
This commit is contained in:
@@ -75,7 +75,7 @@ impl<'a> MessageHandler<ToolMessage, &mut ToolActionMessageContext<'a>> for Artb
|
||||
|
||||
impl LayoutHolder for ArtboardTool {
|
||||
fn layout(&self) -> Layout {
|
||||
Layout::WidgetLayout(WidgetLayout::default())
|
||||
Layout::default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ impl LayoutHolder for BrushTool {
|
||||
.widget_instance(),
|
||||
);
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ impl ToolMetadata for EyedropperTool {
|
||||
|
||||
impl LayoutHolder for EyedropperTool {
|
||||
fn layout(&self) -> Layout {
|
||||
Layout::WidgetLayout(WidgetLayout::default())
|
||||
Layout::default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ impl ToolMetadata for FillTool {
|
||||
|
||||
impl LayoutHolder for FillTool {
|
||||
fn layout(&self) -> Layout {
|
||||
Layout::WidgetLayout(WidgetLayout::default())
|
||||
Layout::default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ impl LayoutHolder for FreehandTool {
|
||||
widgets.push(Separator::new(SeparatorType::Unrelated).widget_instance());
|
||||
widgets.push(create_weight_widget(self.options.line_weight));
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ impl LayoutHolder for GradientTool {
|
||||
.selected_index(Some((self.selected_gradient().unwrap_or(self.options.gradient_type) == GradientType::Radial) as u32))
|
||||
.widget_instance();
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets: vec![gradient_type] }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets: vec![gradient_type] }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ impl ToolMetadata for NavigateTool {
|
||||
|
||||
impl LayoutHolder for NavigateTool {
|
||||
fn layout(&self) -> Layout {
|
||||
Layout::WidgetLayout(WidgetLayout::default())
|
||||
Layout::default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ impl LayoutHolder for PathTool {
|
||||
|
||||
let _pin_pivot = pin_pivot_widget(self.tool_data.pivot_gizmo.pin_active(), false, PivotToolSource::Path);
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row {
|
||||
Layout(vec![LayoutGroup::Row {
|
||||
widgets: vec![
|
||||
x_location,
|
||||
related_seperator.clone(),
|
||||
@@ -367,7 +367,7 @@ impl LayoutHolder for PathTool {
|
||||
// related_seperator.clone(),
|
||||
// pin_pivot,
|
||||
],
|
||||
}]))
|
||||
}])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ impl LayoutHolder for PenTool {
|
||||
.widget_instance(),
|
||||
);
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ impl LayoutHolder for SelectTool {
|
||||
widgets.extend(self.alignment_widgets(disabled));
|
||||
// widgets.push(
|
||||
// PopoverButton::new()
|
||||
// .popover_layout(WidgetLayout(vec![
|
||||
// .popover_layout(Layout(vec![
|
||||
// LayoutGroup::Row {
|
||||
// widgets: vec![TextLabel::new("Align").bold(true).widget_instance()],
|
||||
// },
|
||||
@@ -277,7 +277,7 @@ impl LayoutHolder for SelectTool {
|
||||
widgets.push(Separator::new(SeparatorType::Unrelated).widget_instance());
|
||||
widgets.extend(self.boolean_widgets(self.tool_data.selected_layers_count));
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ impl LayoutHolder for ShapeTool {
|
||||
widgets.push(Separator::new(SeparatorType::Unrelated).widget_instance());
|
||||
widgets.push(create_weight_widget(self.options.line_weight));
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ impl LayoutHolder for SplineTool {
|
||||
widgets.push(Separator::new(SeparatorType::Unrelated).widget_instance());
|
||||
widgets.push(create_weight_widget(self.options.line_weight));
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ impl LayoutHolder for TextTool {
|
||||
},
|
||||
));
|
||||
|
||||
Layout::WidgetLayout(WidgetLayout(vec![LayoutGroup::Row { widgets }]))
|
||||
Layout(vec![LayoutGroup::Row { widgets }])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user