liora-components 0.1.2

Enterprise-style native GPUI component library for Liora applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use gpui::{ElementId, Pixels, SharedString};

pub trait PixelsExt {
    fn as_f32(self) -> f32;
}

impl PixelsExt for Pixels {
    fn as_f32(self) -> f32 {
        f32::from(self)
    }
}

pub fn element_id(id: impl Into<SharedString>) -> ElementId {
    ElementId::from(id.into())
}