Rename theme::Definition to application::StyleSheet
This commit is contained in:
parent
3e8f4cdd13
commit
7f3b7075db
12 changed files with 37 additions and 27 deletions
7
style/src/application.rs
Normal file
7
style/src/application.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use iced_core::Color;
|
||||
|
||||
pub trait StyleSheet {
|
||||
fn background_color(&self) -> Color;
|
||||
|
||||
fn text_color(&self) -> Color;
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
)]
|
||||
pub use iced_core::{Background, Color};
|
||||
|
||||
pub mod application;
|
||||
pub mod button;
|
||||
pub mod checkbox;
|
||||
pub mod container;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ mod palette;
|
|||
|
||||
pub use self::palette::Palette;
|
||||
|
||||
use crate::application;
|
||||
use crate::button;
|
||||
use crate::slider;
|
||||
|
||||
|
|
@ -35,13 +36,7 @@ impl Default for Theme {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait Definition {
|
||||
fn background_color(&self) -> Color;
|
||||
|
||||
fn text_color(&self) -> Color;
|
||||
}
|
||||
|
||||
impl Definition for Theme {
|
||||
impl application::StyleSheet for Theme {
|
||||
fn background_color(&self) -> Color {
|
||||
let palette = self.extended_palette();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue