glassy-ui 0.1.0

Glassy UI components for native GPUI interfaces.
1
2
3
4
5
6
7
8
9
10
11
use gpui::{Refineable, StyleRefinement, Styled};

/// Merge a [`StyleRefinement`] into any [`Styled`] element.
pub trait StyledSlot: Styled + Sized {
    fn refine_style(mut self, style: &StyleRefinement) -> Self {
        self.style().refine(style);
        self
    }
}

impl<T: Styled> StyledSlot for T {}