diff options
-rw-r--r-- | widget/src/container.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/widget/src/container.rs b/widget/src/container.rs index d65bb086..b991e0f1 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -10,8 +10,9 @@ use crate::core::renderer; use crate::core::widget::tree::{self, Tree}; use crate::core::widget::{self, Operation}; use crate::core::{ - self, Background, Clipboard, Color, Element, Layout, Length, Padding, - Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector, Widget, + self, color, Background, Clipboard, Color, Element, Layout, Length, + Padding, Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector, + Widget, }; use crate::runtime::task::{self, Task}; @@ -654,3 +655,12 @@ pub fn bordered_box(theme: &Theme) -> Style { ..Style::default() } } + +/// A [`Container`] with a dark background and white text. +pub fn dark(_theme: &Theme) -> Style { + Style { + background: Some(color!(0x333333).into()), + text_color: Some(Color::WHITE), + ..Style::default() + } +} |