1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Add light mode

This commit is contained in:
Emil Ernerfeldt
2021-02-03 01:08:23 +01:00
parent c536e1b0da
commit a19fd7b780
12 changed files with 230 additions and 67 deletions

View File

@@ -22,14 +22,22 @@ impl Shadow {
}
}
/// Windows
pub fn big() -> Self {
/// Subtle and nice on dark backgrounds
pub fn big_dark() -> Self {
Self {
extrusion: 32.0,
color: Color32::from_black_alpha(96),
}
}
/// Subtle and nice on white backgrounds
pub fn big_light() -> Self {
Self {
extrusion: 32.0,
color: Color32::from_black_alpha(40),
}
}
pub fn tessellate(&self, rect: emath::Rect, corner_radius: f32) -> Mesh {
// tessellator.clip_rect = clip_rect; // TODO: culling