mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
stylecontext: fix icon-source extents computation
for the builtin image or invalid matrix case. We used to return invalid memory in those cases. And that was not good.
This commit is contained in:
parent
57d24f173a
commit
7eb3b6c71f
@ -3548,10 +3548,10 @@ _gtk_style_context_get_icon_extents (GtkStyleContext *context,
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (extents != NULL);
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
extents->x = x;
|
||||
extents->y = y;
|
||||
extents->width = width;
|
||||
extents->height = height;
|
||||
|
||||
/* strictly speaking we should return an empty rect here,
|
||||
* but most code still draws a fallback in this case */
|
||||
|
Loading…
Reference in New Issue
Block a user