Fix icon alignment with dynamic width
This commit is contained in:
parent
3f5257f285
commit
ec96871a0f
15
src/x.c
15
src/x.c
@ -165,17 +165,6 @@ static void r_setup_pango_layout(PangoLayout *layout, int width)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r_update_layouts_width(GSList *layouts, int width)
|
|
||||||
{
|
|
||||||
width -= 2 * settings.h_padding;
|
|
||||||
width -= 2 * settings.frame_width;
|
|
||||||
|
|
||||||
for (GSList *iter = layouts; iter; iter = iter->next) {
|
|
||||||
colored_layout *cl = iter->data;
|
|
||||||
pango_layout_set_width(cl->l, width * PANGO_SCALE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free_colored_layout(void *data)
|
static void free_colored_layout(void *data)
|
||||||
{
|
{
|
||||||
colored_layout *cl = data;
|
colored_layout *cl = data;
|
||||||
@ -651,10 +640,6 @@ void x_win_draw(void)
|
|||||||
int width = dim.w;
|
int width = dim.w;
|
||||||
int height = dim.h;
|
int height = dim.h;
|
||||||
|
|
||||||
if ((have_dynamic_width() || settings.shrink) && settings.align != left) {
|
|
||||||
r_update_layouts_width(layouts, width);
|
|
||||||
}
|
|
||||||
|
|
||||||
cairo_t *c;
|
cairo_t *c;
|
||||||
cairo_surface_t *image_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
|
cairo_surface_t *image_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
|
||||||
c = cairo_create(image_surface);
|
c = cairo_create(image_surface);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user