Commit dce4003c authored by Matthias Clasen's avatar Matthias Clasen

Fix preconditions in set_max_content_size setters

We must allow resetting the properties to -1.
parent 775e277a
......@@ -4488,7 +4488,7 @@ gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window,
priv = scrolled_window->priv;
g_return_if_fail (priv->max_content_width == -1 || width <= priv->max_content_width);
g_return_if_fail (width == -1 || priv->max_content_width == -1 || width <= priv->max_content_width);
if (priv->min_content_width != width)
{
......@@ -4542,7 +4542,7 @@ gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window,
priv = scrolled_window->priv;
g_return_if_fail (priv->max_content_height == -1 || height <= priv->max_content_height);
g_return_if_fail (height == -1 || priv->max_content_height == -1 || height <= priv->max_content_height);
if (priv->min_content_height != height)
{
......@@ -4626,7 +4626,7 @@ gtk_scrolled_window_set_max_content_width (GtkScrolledWindow *scrolled_window,
priv = scrolled_window->priv;
g_return_if_fail (priv->min_content_width == -1 || width >= priv->min_content_width);
g_return_if_fail (width == -1 || priv->min_content_width == -1 || width >= priv->min_content_width);
if (width != priv->max_content_width)
{
......@@ -4678,7 +4678,7 @@ gtk_scrolled_window_set_max_content_height (GtkScrolledWindow *scrolled_window,
priv = scrolled_window->priv;
g_return_if_fail (priv->min_content_height == -1 || height >= priv->min_content_height);
g_return_if_fail (height == -1 || priv->min_content_height == -1 || height >= priv->min_content_height);
if (height != priv->max_content_height)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment