Menu bar definition in backend (#681)

* initial menu layout working

* removed api.rs functions

* no action shortcut for no-op

* code review

* nitpicks
This commit is contained in:
mfish33
2022-06-18 18:46:23 -06:00
committed by Keavon Chambers
parent 9bd27ec3f8
commit 5d6d2b22bc
35 changed files with 781 additions and 475 deletions
+5 -5
View File
@@ -2,7 +2,7 @@ use super::tools::*;
use crate::communication::message_handler::MessageHandler;
use crate::document::DocumentMessageHandler;
use crate::input::InputPreprocessorMessageHandler;
use crate::layout::widgets::{IconButton, LayoutRow, PropertyHolder, Separator, SeparatorDirection, SeparatorType, Widget, WidgetCallback, WidgetHolder, WidgetLayout};
use crate::layout::widgets::{IconButton, Layout, LayoutGroup, PropertyHolder, Separator, SeparatorDirection, SeparatorType, Widget, WidgetCallback, WidgetHolder, WidgetLayout};
use crate::message_prelude::*;
use graphene::color::Color;
@@ -58,7 +58,7 @@ impl ToolData {
}
impl PropertyHolder for ToolData {
fn properties(&self) -> WidgetLayout {
fn properties(&self) -> Layout {
let tool_groups_layout = ToolType::list_tools_in_groups()
.iter()
.flat_map(|group| {
@@ -88,9 +88,9 @@ impl PropertyHolder for ToolData {
.skip(1)
.collect();
WidgetLayout {
layout: vec![LayoutRow::Column { widgets: tool_groups_layout }],
}
Layout::WidgetLayout(WidgetLayout {
layout: vec![LayoutGroup::Column { widgets: tool_groups_layout }],
})
}
}