From f54590d7adac611db84b88cbcbf4f56c7542039c Mon Sep 17 00:00:00 2001 From: Clark Moody Date: Tue, 8 Dec 2020 18:47:01 -0600 Subject: Replace TitleBar string title with generic Content --- native/src/widget/pane_grid.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'native/src/widget/pane_grid.rs') diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index ff19cbc2..85ef021f 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -586,18 +586,15 @@ pub trait Renderer: /// It receives: /// - the bounds, style of the [`TitleBar`] /// - the style of the [`TitleBar`] - /// - the title of the [`TitleBar`] with its size, font, and bounds - /// - the controls of the [`TitleBar`] with their [`Layout`+, if any + /// - the content of the [`TitleBar`] with its layout + /// - the controls of the [`TitleBar`] with their [`Layout`], if any /// - the cursor position fn draw_title_bar( &mut self, defaults: &Self::Defaults, bounds: Rectangle, style: &Self::Style, - title: &str, - title_size: u16, - title_font: Self::Font, - title_bounds: Rectangle, + content: (&Element<'_, Message, Self>, Layout<'_>), controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>, cursor_position: Point, ) -> Self::Output; -- cgit From f2c2f3fc7588054417a0c44d3890defa976c5f61 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 22 Dec 2020 14:44:44 +0100 Subject: Remove unnecessary `text::Renderer` bound for `PaneGrid` This is no longer necessary, as we do not render text directly anymore. --- native/src/widget/pane_grid.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'native/src/widget/pane_grid.rs') diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 85ef021f..9cf8bc34 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -33,7 +33,6 @@ use crate::layout; use crate::mouse; use crate::overlay; use crate::row; -use crate::text; use crate::{ Clipboard, Element, Hasher, Layout, Length, Point, Rectangle, Size, Vector, Widget, @@ -543,9 +542,7 @@ where /// able to use a [`PaneGrid`] in your user interface. /// /// [renderer]: crate::renderer -pub trait Renderer: - crate::Renderer + container::Renderer + text::Renderer + Sized -{ +pub trait Renderer: crate::Renderer + container::Renderer + Sized { /// Draws a [`PaneGrid`]. /// /// It receives: -- cgit