some minor code cleanup, and set single paragraph mode

This commit is contained in:
speedie 2023-05-21 16:27:14 +02:00
parent a5d1186118
commit 1faa75ad36

View file

@ -272,7 +272,7 @@ int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned in
pango_layout_set_text(drw->font->layout, buf, len);
}
cairo_save(drw->d);
pango_layout_set_single_paragraph_mode(drw->font->layout, True);
cairo_set_source_rgb(drw->d, convert_color(drw->scheme->red), convert_color(drw->scheme->green), convert_color(drw->scheme->blue));
cairo_move_to(drw->d, x, ty);
@ -280,8 +280,6 @@ int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned in
pango_cairo_update_layout(drw->d, drw->font->layout);
pango_cairo_show_layout(drw->d, drw->font->layout);
cairo_restore(drw->d);
if (markup) // clear markup attributes
pango_layout_set_attributes(drw->font->layout, NULL);
}