summaryrefslogtreecommitdiffstats
path: root/style
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 03:56:39 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 10:01:51 +0100
commitd76705df29f1960124bd06277683448e18f788b0 (patch)
treea8bc568d93972f7b2ce7209317602c571ab8b6ab /style
parent5dbded61dea19f77eb370e08e72acfa20ffd1a86 (diff)
downloadiced-d76705df29f1960124bd06277683448e18f788b0.tar.gz
iced-d76705df29f1960124bd06277683448e18f788b0.tar.bz2
iced-d76705df29f1960124bd06277683448e18f788b0.zip
Add `explain` toggle to `layout` example
Diffstat (limited to 'style')
-rw-r--r--style/src/theme/palette.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/style/src/theme/palette.rs b/style/src/theme/palette.rs
index aaeb799d..76977a29 100644
--- a/style/src/theme/palette.rs
+++ b/style/src/theme/palette.rs
@@ -82,6 +82,8 @@ pub struct Extended {
pub success: Success,
/// The set of danger colors.
pub danger: Danger,
+ /// Whether the palette is dark or not.
+ pub is_dark: bool,
}
/// The built-in light variant of an [`Extended`] palette.
@@ -113,6 +115,7 @@ impl Extended {
palette.background,
palette.text,
),
+ is_dark: is_dark(palette.background),
}
}
}