mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +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);
|
||||
update_label_text (layout, t - begin_time, want_msec);
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user