Add style, font, and card example packages; extend geometry and color

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
SpriteandClaude Sonnet 5.5 committed 2026-11-24 21:44:05 +00:00
1 parent 8c0685fe01
commit 1e2bcde532
26 files changed
+45666 -30

No files matched your search

+21 -1
View File
@@ -19,7 +19,7 @@ pub(all) struct Rgba {
///|
/// A color as hue, saturation, lightness and alpha, all in `0.0..=1.0`.
#derive(Eq, Compare, Default, Debug)
#derive(Eq, Compare, Hash, Default, Debug)
pub(all) struct Hsla {
h : Double
s : Double
@@ -515,3 +515,23 @@ pub fn Background::is_transparent(self : Background) -> Bool {
self.colors.1.color.is_transparent()
}
}
// ---------------------------------------------------------------------------
// Conversions standing in for GPUI's `impl Into<Hsla>` parameters.
// ---------------------------------------------------------------------------
///|
/// Anything usable where GPUI takes `impl Into<Hsla>`: `Hsla` and `Rgba`.
pub(open) trait IntoHsla {
fn into_hsla(Self) -> Hsla
}
///|
pub impl IntoHsla for Hsla with fn into_hsla(self) {
self
}
///|
pub impl IntoHsla for Rgba with fn into_hsla(self) {
self.to_hsla()
}