diff options
| author | 2020-07-09 06:27:12 +0200 | |
|---|---|---|
| committer | 2020-07-09 06:27:12 +0200 | |
| commit | 1319c25f20a274d163d8009805b6fd3bb55ac88a (patch) | |
| tree | cf4918e5cff495f060823966f6d2efaef58f5c49 /graphics | |
| parent | ef553cd12456a3fd70df26c936953887a78a1bba (diff) | |
| download | iced-1319c25f20a274d163d8009805b6fd3bb55ac88a.tar.gz iced-1319c25f20a274d163d8009805b6fd3bb55ac88a.tar.bz2 iced-1319c25f20a274d163d8009805b6fd3bb55ac88a.zip  | |
Respect `TitleBar` text color style when drawing
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/src/widget/pane_grid.rs | 17 | 
1 files changed, 14 insertions, 3 deletions
diff --git a/graphics/src/widget/pane_grid.rs b/graphics/src/widget/pane_grid.rs index 8ec5c547..aa8a3f7c 100644 --- a/graphics/src/widget/pane_grid.rs +++ b/graphics/src/widget/pane_grid.rs @@ -9,6 +9,7 @@  //! [`pane_grid` example]: https://github.com/hecrj/iced/tree/0.1/examples/pane_grid  //! [`PaneGrid`]: type.PaneGrid.html  use crate::backend::{self, Backend}; +use crate::defaults;  use crate::{Primitive, Renderer};  use iced_native::mouse;  use iced_native::pane_grid; @@ -197,11 +198,17 @@ where      ) -> Self::Output {          let style = style_sheet.style(); +        let defaults = Self::Defaults { +            text: defaults::Text { +                color: style.text_color.unwrap_or(defaults.text.color), +            }, +        }; +          let background = crate::widget::container::background(bounds, &style);          let (title_primitive, _) = text::Renderer::draw(              self, -            defaults, +            &defaults,              title_bounds,              title,              title_size, @@ -212,8 +219,12 @@ where          );          if let Some((controls, controls_layout)) = controls { -            let (controls_primitive, controls_interaction) = -                controls.draw(self, defaults, controls_layout, cursor_position); +            let (controls_primitive, controls_interaction) = controls.draw( +                self, +                &defaults, +                controls_layout, +                cursor_position, +            );              (                  Primitive::Group {  | 
