mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 12:50:04 -04:00
[style] Tweak vertical text alignment
This commit is contained in:
@@ -322,13 +322,14 @@ impl FontImplCache {
|
||||
}
|
||||
|
||||
let y_offset = if font_name == "emoji-icon-font" {
|
||||
1.0 // TODO: remove font alignment hack
|
||||
scale_in_points * 0.235 // TODO: remove font alignment hack
|
||||
} else {
|
||||
-3.0 // TODO: remove font alignment hack
|
||||
0.0
|
||||
};
|
||||
let y_offset = y_offset - 3.0; // Tweaked to make text look centered in buttons and text edit fields
|
||||
|
||||
let scale_in_points = if font_name == "emoji-icon-font" {
|
||||
scale_in_points - 2.0 // TODO: remove HACK!
|
||||
scale_in_points * 0.8 // TODO: remove HACK!
|
||||
} else {
|
||||
scale_in_points
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user