mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -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:
@@ -17,7 +17,7 @@ impl Default for WrappedTextureManager {
|
||||
// Will be filled in later
|
||||
let font_id = tex_mngr.alloc(
|
||||
"egui_font_texture".into(),
|
||||
epaint::AlphaImage::new([0, 0]).into(),
|
||||
epaint::FontImage::new([0, 0]).into(),
|
||||
);
|
||||
assert_eq!(font_id, TextureId::default());
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ pub use epaint::{
|
||||
color, mutex,
|
||||
text::{FontData, FontDefinitions, FontFamily, FontId, FontTweak},
|
||||
textures::TexturesDelta,
|
||||
AlphaImage, ClippedPrimitive, Color32, ColorImage, ImageData, Mesh, PaintCallback,
|
||||
ClippedPrimitive, Color32, ColorImage, FontImage, ImageData, Mesh, PaintCallback,
|
||||
PaintCallbackInfo, Rgba, Rounding, Shape, Stroke, TextureHandle, TextureId,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user