mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
ticks: don't draw final layout if there isn't space
This just helps keep things from geting cut off.
This commit is contained in:
@ -198,7 +198,9 @@ draw_ticks (SysprofVisualizerTicks *self,
|
|||||||
cairo_move_to (cr, (gint)x + 2.5 - (gint)half, 2);
|
cairo_move_to (cr, (gint)x + 2.5 - (gint)half, 2);
|
||||||
update_label_text (layout, t - begin_time, want_msec);
|
update_label_text (layout, t - begin_time, want_msec);
|
||||||
pango_layout_get_pixel_size (layout, &w, &h);
|
pango_layout_get_pixel_size (layout, &w, &h);
|
||||||
pango_cairo_show_layout (cr, layout);
|
|
||||||
|
if (x + w <= alloc.width)
|
||||||
|
pango_cairo_show_layout (cr, layout);
|
||||||
|
|
||||||
last_x2 = x + w;
|
last_x2 = x + w;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user