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:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user