Introduce container::dark style
This commit is contained in:
parent
05884870fc
commit
58f361d680
1 changed files with 12 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue