mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 20:50:12 +00:00
text: Shrink error underlines
The 3 * underline thickness that Pango gives us for the height of error underlines is just too big for the dotted line we use now. Shrink it down.
This commit is contained in:
parent
4f7b95c4b6
commit
2557cbb984
@ -207,6 +207,13 @@ gsk_pango_renderer_draw_error_underline (PangoRenderer *renderer,
|
||||
ww = (double)width / PANGO_SCALE;
|
||||
hh = (double)height / PANGO_SCALE;
|
||||
|
||||
/* Pango sets the height of error underlines to be 3 * underline thickness.
|
||||
* That is appropriate for the traditional zigzag pattern, but our balls
|
||||
* get just too big with that, so scale things down to 1.3 * underline
|
||||
* thickness, which looks good, experimentally.
|
||||
*/
|
||||
hh = hh * 1.3 / 3.0;
|
||||
|
||||
get_color (crenderer, PANGO_RENDER_PART_UNDERLINE, &color);
|
||||
|
||||
gtk_snapshot_push_repeat (crenderer->snapshot,
|
||||
|
Loading…
Reference in New Issue
Block a user