Replace TitleBar string title with generic Content

This commit is contained in:
Clark Moody 2020-12-08 18:47:01 -06:00
parent d16b9cf7cd
commit f54590d7ad
4 changed files with 51 additions and 102 deletions

View file

@ -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<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;