diff options
author | 2020-12-22 14:58:39 +0100 | |
---|---|---|
committer | 2020-12-22 14:58:39 +0100 | |
commit | f8aef03456ecc185098b6305a8cd0e22f5297d06 (patch) | |
tree | bdd8fd190980840235c4d10365cac98f3a260c21 /native/src/widget/pane_grid.rs | |
parent | a366600e7347c24bbb6679118a12b616a031deff (diff) | |
parent | e815c5bbd72f618ad890e1d3c5a67c811cd07108 (diff) | |
download | iced-f8aef03456ecc185098b6305a8cd0e22f5297d06.tar.gz iced-f8aef03456ecc185098b6305a8cd0e22f5297d06.tar.bz2 iced-f8aef03456ecc185098b6305a8cd0e22f5297d06.zip |
Merge pull request #657 from clarkmoody/feature/pane-grid-title-contents
Generic Element Content in Pane Grid TitleBar
Diffstat (limited to 'native/src/widget/pane_grid.rs')
-rw-r--r-- | native/src/widget/pane_grid.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index ff19cbc2..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: @@ -586,18 +583,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<Message>( &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; |