mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Clip text with extents rectangle
Fonts are not ideal, some characters have mismatch between reported and painted size.
This commit is contained in:
parent
51a8df9da5
commit
9b2b52b13e
1 changed files with 4 additions and 0 deletions
|
@ -568,7 +568,11 @@ static void textbox_draw(widget *wid, cairo_t *draw) {
|
|||
|
||||
// draw the text
|
||||
cairo_save(draw);
|
||||
double x1, y1, x2, y2;
|
||||
cairo_clip_extents(draw, &x1, &y1, &x2, &y2);
|
||||
cairo_reset_clip(draw);
|
||||
cairo_rectangle(draw, x1, y1, x2 - x1, y2 - y1);
|
||||
cairo_clip(draw);
|
||||
|
||||
gboolean show_outline =
|
||||
rofi_theme_get_boolean(WIDGET(tb), "text-outline", FALSE);
|
||||
|
|
Loading…
Reference in a new issue