summaryrefslogtreecommitdiffstats
path: root/native/src/overlay/menu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/overlay/menu.rs')
-rw-r--r--native/src/overlay/menu.rs24
1 files changed, 6 insertions, 18 deletions
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs
index 08135872..099b1a97 100644
--- a/native/src/overlay/menu.rs
+++ b/native/src/overlay/menu.rs
@@ -9,7 +9,7 @@ use crate::text::{self, Text};
use crate::touch;
use crate::widget::container::{self, Container};
use crate::widget::scrollable::{self, Scrollable};
-use crate::widget::tree::{self, Tree};
+use crate::widget::Tree;
use crate::{
Clipboard, Color, Element, Layout, Length, Padding, Point, Rectangle,
Shell, Size, Vector, Widget,
@@ -178,7 +178,7 @@ where
font,
text_size,
padding,
- style,
+ style: style.clone(),
}));
state.tree.diff(&container as &dyn Widget<_, _>);
@@ -199,18 +199,6 @@ where
Renderer: text::Renderer,
Renderer::Theme: StyleSheet + container::StyleSheet,
{
- fn tag(&self) -> tree::Tag {
- self.container.tag()
- }
-
- fn state(&self) -> tree::State {
- self.container.state()
- }
-
- fn children(&self) -> Vec<Tree> {
- self.container.children()
- }
-
fn layout(
&self,
renderer: &Renderer,
@@ -288,7 +276,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
) {
- let appearance = theme.appearance(self.style);
+ let appearance = theme.appearance(&self.style);
let bounds = layout.bounds();
renderer.fill_quad(
@@ -299,7 +287,7 @@ where
},
border_color: appearance.border_color,
border_width: appearance.border_width,
- border_radius: appearance.border_radius,
+ border_radius: appearance.border_radius.into(),
},
appearance.background,
);
@@ -460,7 +448,7 @@ where
_cursor_position: Point,
viewport: &Rectangle,
) {
- let appearance = theme.appearance(self.style);
+ let appearance = theme.appearance(&self.style);
let bounds = layout.bounds();
let text_size =
@@ -491,7 +479,7 @@ where
bounds,
border_color: Color::TRANSPARENT,
border_width: 0.0,
- border_radius: appearance.border_radius,
+ border_radius: appearance.border_radius.into(),
},
appearance.selected_background,
);