summaryrefslogtreecommitdiffstats
path: root/style/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-08 20:07:33 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-08 20:07:33 +0200
commitbb07d017e8c8e43ac74f66bf649643bebdc5f71d (patch)
tree6e780f78ef4eae7dbe590a82ceef11e47289d953 /style/src/application.rs
parentfa55dff61db47197a961152285c6a6abfab0b217 (diff)
downloadiced-bb07d017e8c8e43ac74f66bf649643bebdc5f71d.tar.gz
iced-bb07d017e8c8e43ac74f66bf649643bebdc5f71d.tar.bz2
iced-bb07d017e8c8e43ac74f66bf649643bebdc5f71d.zip
Add `Style` variant support to `application::StyleSheet`
Diffstat (limited to '')
-rw-r--r--style/src/application.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/style/src/application.rs b/style/src/application.rs
index 4aa950fb..d48c6a34 100644
--- a/style/src/application.rs
+++ b/style/src/application.rs
@@ -1,7 +1,13 @@
use iced_core::Color;
pub trait StyleSheet {
- fn background_color(&self) -> Color;
+ type Style: Default + Copy;
- fn text_color(&self) -> Color;
+ fn appearance(&self, style: Self::Style) -> Appearance;
+}
+
+#[derive(Debug, Clone, Copy, PartialEq)]
+pub struct Appearance {
+ pub background_color: Color,
+ pub text_color: Color,
}