app: fix GimpMeter history-graph painting when clipped
In GimpMeter, use cairo_path_extents() for getting the history
graph's extents, rather than cairo_clip_extents(), since the latter
may also include clipping applied by GTK.
(cherry picked from commit b8e08cddbc
)
This commit is contained in:
@ -571,9 +571,8 @@ gimp_meter_expose_event (GtkWidget *widget,
|
|||||||
allocation.width - BORDER_WIDTH - 0.5 * size,
|
allocation.width - BORDER_WIDTH - 0.5 * size,
|
||||||
0.25 * size);
|
0.25 * size);
|
||||||
cairo_close_path (cr);
|
cairo_close_path (cr);
|
||||||
cairo_clip (cr);
|
|
||||||
|
|
||||||
cairo_clip_extents (cr,
|
cairo_path_extents (cr,
|
||||||
&history_x1, &history_y1,
|
&history_x1, &history_y1,
|
||||||
&history_x2, &history_y2);
|
&history_x2, &history_y2);
|
||||||
|
|
||||||
@ -582,6 +581,8 @@ gimp_meter_expose_event (GtkWidget *widget,
|
|||||||
history_x2 = ceil (history_x2);
|
history_x2 = ceil (history_x2);
|
||||||
history_y2 = ceil (history_y2);
|
history_y2 = ceil (history_y2);
|
||||||
|
|
||||||
|
cairo_clip (cr);
|
||||||
|
|
||||||
/* paint history background */
|
/* paint history background */
|
||||||
gdk_cairo_set_source_color (cr, &style->light[state]);
|
gdk_cairo_set_source_color (cr, &style->light[state]);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
Reference in New Issue
Block a user