UI: Fix offset of vertical scale indicators
`BLF_height_max()` uses the tallest character in the font, and many characters in our font are taller than numbers. Use `BLF_height` with `0` as reference instead. Fix by @harley, thanks!
This commit is contained in:
parent
93a8fd1249
commit
e46055ae9d
@ -405,7 +405,7 @@ static void draw_vertical_scale_indicators(const ARegion *region,
|
||||
const float xpos = (rect->xmin + x_offset) * UI_DPI_FAC;
|
||||
const float ymin = rect->ymin;
|
||||
const float ymax = rect->ymax;
|
||||
const float y_offset = (BLF_height_max(font_id) / 2.0f) - U.pixelsize;
|
||||
const float y_offset = (BLF_height(font_id, "0", 1) / 2.0f) - U.pixelsize;
|
||||
|
||||
for (uint i = 0; i < steps; i++) {
|
||||
const float ypos_view = start + i * distance;
|
||||
|
Loading…
Reference in New Issue
Block a user