From c0596179bd8582e4f4b5289cdeee8de4fa3de464 Mon Sep 17 00:00:00 2001 From: Robert Krahn Date: Thu, 3 Nov 2022 00:35:01 +0100 Subject: non uniform border radius for quads --- native/src/overlay/menu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'native/src/overlay/menu.rs') diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 08135872..dbcf23d4 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -299,7 +299,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, ); @@ -491,7 +491,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, ); -- cgit From 18fb74f20092b2703a90afdb01f39754445998da Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 9 Nov 2022 04:05:31 +0100 Subject: Introduce `Custom` variants for every style in the built-in `Theme` --- native/src/overlay/menu.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'native/src/overlay/menu.rs') diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 08135872..3b55eba1 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -178,7 +178,7 @@ where font, text_size, padding, - style, + style: style.clone(), })); state.tree.diff(&container as &dyn Widget<_, _>); @@ -288,7 +288,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( @@ -460,7 +460,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 = -- cgit From 1480ab20306e463b69b2229dcd5e81d4c66b2a64 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 10 Nov 2022 00:10:53 +0100 Subject: Fix broken documentation links --- native/src/overlay/menu.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'native/src/overlay/menu.rs') diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 3b55eba1..2e4f70b5 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, @@ -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 { - self.container.children() - } - fn layout( &self, renderer: &Renderer, -- cgit