mirror of
https://github.com/labwc/labwc.git
synced 2026-03-02 01:40:24 -05:00
osd: set field width to ellipsize
This commit is contained in:
parent
693c5bd937
commit
09c1cdd2dc
1 changed files with 3 additions and 1 deletions
|
|
@ -367,9 +367,11 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
int field_width = field->width / 100.0 * OSD_ITEM_WIDTH;
|
||||||
|
pango_layout_set_width(layout, field_width * PANGO_SCALE);
|
||||||
pango_layout_set_text(layout, buf.buf, -1);
|
pango_layout_set_text(layout, buf.buf, -1);
|
||||||
pango_cairo_show_layout(cairo, layout);
|
pango_cairo_show_layout(cairo, layout);
|
||||||
x += field->width / 100.0 * OSD_ITEM_WIDTH;
|
x += field_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view == cycle_view) {
|
if (view == cycle_view) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue