Correctly handle min size. (#320465, Philipp Langdale)

2006-12-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwindow.c (gtk_window_compute_configure_request_size):
        Correctly handle min size. (#320465, Philipp Langdale)



svn path=/trunk/; revision=16986
This commit is contained in:
Matthias Clasen
2006-12-31 00:57:27 +00:00
committed by Matthias Clasen
parent 8ce94262f1
commit e43f1bd251
2 changed files with 12 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
2006-12-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_compute_configure_request_size):
Correctly handle min size. (#320465, Philipp Langdale)
2006-12-30 Matthias Clasen <mclasen@redhat.com>
* gtk/prop-editor.c: Implement editing of flags.

View File

@@ -5120,6 +5120,8 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
{
gint base_width = 0;
gint base_height = 0;
gint min_width = 0;
gint min_height = 0;
gint width_inc = 1;
gint height_inc = 1;
@@ -5136,10 +5138,10 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
base_width = geometry.base_width;
base_height = geometry.base_height;
}
else if (flags & GDK_HINT_MIN_SIZE)
if (flags & GDK_HINT_MIN_SIZE)
{
base_width = geometry.min_width;
base_height = geometry.min_height;
min_width = geometry.min_width;
min_height = geometry.min_height;
}
if (flags & GDK_HINT_RESIZE_INC)
{
@@ -5149,10 +5151,10 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
}
if (info->default_width > 0)
*width = info->default_width * width_inc + base_width;
*width = MAX (info->default_width * width_inc + base_width, min_width);
if (info->default_height > 0)
*height = info->default_height * height_inc + base_height;
*height = MAX (info->default_height * height_inc + base_height, min_height);
}
}
else