forked from AuroraMiddleware/gtk
Fixed height-for-width cache
Fixed the cache to be cleared when flagged with WIDTH/HEIGHT_REQUEST_NEEDED. This error was causing some widgets to not be sized correctly (the stock and icon browser in the demo for instance).
This commit is contained in:
parent
119267d7c8
commit
ee8db39393
@ -129,6 +129,7 @@ get_cache (GtkExtendedLayout *layout, gboolean create)
|
|||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_size_request (GtkWidget *widget)
|
do_size_request (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@ -166,6 +167,8 @@ compute_size_for_orientation (GtkExtendedLayout *layout,
|
|||||||
|
|
||||||
if (GTK_WIDGET_WIDTH_REQUEST_NEEDED (layout) == FALSE)
|
if (GTK_WIDGET_WIDTH_REQUEST_NEEDED (layout) == FALSE)
|
||||||
found_in_cache = get_cached_desired_size (for_size, cache->desired_widths, &cached_size);
|
found_in_cache = get_cached_desired_size (for_size, cache->desired_widths, &cached_size);
|
||||||
|
else
|
||||||
|
memset (cache->desired_widths, 0x0, N_CACHED_SIZES * sizeof (DesiredSize));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -173,6 +176,8 @@ compute_size_for_orientation (GtkExtendedLayout *layout,
|
|||||||
|
|
||||||
if (GTK_WIDGET_WIDTH_REQUEST_NEEDED (layout) == FALSE)
|
if (GTK_WIDGET_WIDTH_REQUEST_NEEDED (layout) == FALSE)
|
||||||
found_in_cache = get_cached_desired_size (for_size, cache->desired_heights, &cached_size);
|
found_in_cache = get_cached_desired_size (for_size, cache->desired_heights, &cached_size);
|
||||||
|
else
|
||||||
|
memset (cache->desired_heights, 0x0, N_CACHED_SIZES * sizeof (DesiredSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_in_cache)
|
if (!found_in_cache)
|
||||||
|
Loading…
Reference in New Issue
Block a user