Refactored text size computation (missed a change for the battery)
o9000 mrovi9000@gmail.com
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/battery/battery.c
→
src/battery/battery.c
@@ -258,6 +258,8 @@ // draw layout
pango_layout_set_font_description(layout, bat1_font_desc); pango_layout_set_width(layout, battery->area.width * PANGO_SCALE); pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER); + pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); + pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE); pango_layout_set_text(layout, buf_bat_percentage, strlen(buf_bat_percentage)); cairo_set_source_rgba(c, battery->font.color[0], battery->font.color[1], battery->font.color[2], battery->font.alpha);