1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

Improve text contrast in bright mode (#1412)

* Rename AlphaImage to FontImage to discourage any other use for it
* Encode FontImage as f32 and postpone the alpha correction
* Interpret alpha coverage in a new, making dark text darker, improving contrast in bright mode
This commit is contained in:
Emil Ernerfeldt
2022-03-23 16:49:49 +01:00
committed by GitHub
parent d3c002a4e5
commit 8272b08742
11 changed files with 57 additions and 55 deletions

View File

@@ -235,7 +235,7 @@ impl Painter {
);
image.pixels.iter().map(|color| color.to_tuple()).collect()
}
egui::ImageData::Alpha(image) => {
egui::ImageData::Font(image) => {
let gamma = 1.0;
image
.srgba_pixels(gamma)