Set a minimum width on display to get around a nasty bug if smaller than

the statusbar width.
Modified Files:
	ChangeLog app/gdisplay_ops.c
This commit is contained in:
Seth Burgess 2000-01-25 02:33:20 +00:00
parent d3722849d0
commit 38b05ffa04
3 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,11 @@
Mon Jan 24 22:28:00 CET 2000 Seth Burgess <sjburges@gimp.org>
* app/gdisplay_ops.c: Added a minimum width for shrink wrap;
without it, it would map improperly and create a mess for small
images. Its not a very shrunk wrap since the statusbar is so
large, but at least it works. I welcome other suggestions on
better ways to fix this.
Mon Jan 24 23:28:08 CET 2000 Sven Neumann <sven@gimp.org>
* app/gimpdnd.c: I think this time I got it right. Still the same

View File

@ -171,6 +171,10 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
width = ((width + border_x) < s_width) ? width : max_auto_width;
height = ((height + border_y) < s_height) ? height : max_auto_height;
if (width < gdisp->statusarea->requisition.width)
{
width = gdisp->statusarea->requisition.width;
}
/* I don't know why, but if I don't hide the window, it doesn't work */
gtk_widget_hide(gdisp->shell);
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),
@ -207,6 +211,11 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
max_auto_width = MINIMUM (max_auto_width, width);
max_auto_height = MINIMUM (max_auto_height, height);
if (width < gdisp->statusarea->requisition.width)
{
width = gdisp->statusarea->requisition.width;
}
/* I don't know why, but if I don't hide the window, it doesn't work */
gtk_widget_hide(gdisp->shell);
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),

View File

@ -171,6 +171,10 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
width = ((width + border_x) < s_width) ? width : max_auto_width;
height = ((height + border_y) < s_height) ? height : max_auto_height;
if (width < gdisp->statusarea->requisition.width)
{
width = gdisp->statusarea->requisition.width;
}
/* I don't know why, but if I don't hide the window, it doesn't work */
gtk_widget_hide(gdisp->shell);
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),
@ -207,6 +211,11 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
max_auto_width = MINIMUM (max_auto_width, width);
max_auto_height = MINIMUM (max_auto_height, height);
if (width < gdisp->statusarea->requisition.width)
{
width = gdisp->statusarea->requisition.width;
}
/* I don't know why, but if I don't hide the window, it doesn't work */
gtk_widget_hide(gdisp->shell);
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),