1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Improve text redering and do all color operation in gamma space (#2071)

This commit is contained in:
Emil Ernerfeldt
2022-09-24 17:53:11 +02:00
committed by GitHub
parent 29fa63317e
commit 4ac1e28eae
36 changed files with 468 additions and 733 deletions

View File

@@ -14,7 +14,7 @@ pub struct Shadow {
}
impl Shadow {
/// Tooltips, menus, …
/// Tooltips, menus, …, for dark mode.
pub fn small_dark() -> Self {
Self {
extrusion: 16.0,
@@ -22,15 +22,15 @@ impl Shadow {
}
}
/// Tooltips, menus, …
/// Tooltips, menus, …, for light mode.
pub fn small_light() -> Self {
Self {
extrusion: 16.0,
color: Color32::from_black_alpha(32),
color: Color32::from_black_alpha(20),
}
}
/// Subtle and nice on dark backgrounds
/// Used for widnows in dark mode.
pub fn big_dark() -> Self {
Self {
extrusion: 32.0,
@@ -38,11 +38,11 @@ impl Shadow {
}
}
/// Subtle and nice on white backgrounds
/// Used for widnows in light mode.
pub fn big_light() -> Self {
Self {
extrusion: 32.0,
color: Color32::from_black_alpha(40),
color: Color32::from_black_alpha(16),
}
}