Original commit: cf00e3e187
This commit is contained in:
Adam Obuchowicz 2021-04-13 16:14:28 +02:00 committed by GitHub
parent 95499398a3
commit 23e14f393d
2 changed files with 11 additions and 3 deletions

View File

@ -17,6 +17,7 @@ use enso_protocol::language_server::MethodPointer;
use ensogl::application::Application;
use ensogl::display::camera::Camera2d;
use ensogl::display::object::ObjectOps;
use ensogl::display::Scene;
use ensogl::display::shape::*;
use ensogl::display::style;
use ensogl::display;
@ -197,15 +198,21 @@ impl BreadcrumbsModel {
scene.layers.breadcrumbs_background.add_exclusive(&background);
Self{logger,display_object, root,app,breadcrumbs,project_name,breadcrumbs_container,
frp_inputs,current_index,camera,background,gap_width}.init()
frp_inputs,current_index,camera,background,gap_width}.init(&scene)
}
fn init(self) -> Self {
fn init(self, scene:&Scene) -> Self {
self.add_child(&self.root);
self.root.add_child(&self.project_name);
self.root.add_child(&self.breadcrumbs_container);
self.root.add_child(&self.background);
ensogl::shapes_order_dependencies! {
scene => {
background -> breadcrumb::background;
}
}
self.update_layout();
self

View File

@ -52,7 +52,8 @@ const SEPARATOR_MARGIN : f32 = 10.0;
// === Background ===
// ==================
mod background {
/// A transparent "background" of single breadcrumb, set for capturing mouse events.
pub mod background {
use super::*;
ensogl::define_shape_system! {