mirror of https://github.com/GNOME/gimp.git
Modified Files: ChangeLog app/gdisplay_ops.c
Modified Files: ChangeLog app/gdisplay_ops.c Shrink wrap fix - ugly but works.
This commit is contained in:
parent
2f445a6fc5
commit
a4f085afbf
|
@ -1,3 +1,8 @@
|
|||
Wed Jan 19 21:03:00 CST 2000 Seth Burgess <sjburges@gimp.org>
|
||||
|
||||
* app/gdisplay_ops.c: make shrink wrap work. Not an elegant
|
||||
solution (hiding and redrawing window)
|
||||
|
||||
Wed Jan 19 21:36:06 CET 2000 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* cursors/bigcirc
|
||||
|
|
|
@ -131,8 +131,10 @@ gdisplay_close_window (GDisplay *gdisp,
|
|||
void
|
||||
gdisplay_shrink_wrap (GDisplay *gdisp)
|
||||
{
|
||||
/* FIXME: There's something wrong here - ..set_usize() seems to not
|
||||
be doing the right thing when it could... GTK problem? */
|
||||
/* FIXME: Still not perfect - have to hide and show the window to
|
||||
* get it to work. Adding a queue_resize to the shell doesn't
|
||||
* seem to help. Anyone have any good ideas here?
|
||||
*/
|
||||
gint x, y;
|
||||
gint disp_width, disp_height;
|
||||
gint width, height;
|
||||
|
@ -169,8 +171,11 @@ 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;
|
||||
|
||||
gtk_widget_set_usize (gdisp->canvas,
|
||||
width, height);
|
||||
/* 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),
|
||||
width, height);
|
||||
gtk_widget_show(gdisp->shell);
|
||||
|
||||
/*printf("1w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
||||
width, height,
|
||||
|
@ -178,8 +183,6 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
shell_width, shell_height,
|
||||
border_x, border_y);fflush(stdout);*/
|
||||
|
||||
gtk_widget_show (gdisp->canvas);
|
||||
|
||||
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
||||
|
||||
shell_width = width + border_x;
|
||||
|
@ -204,8 +207,11 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
max_auto_width = MINIMUM (max_auto_width, width);
|
||||
max_auto_height = MINIMUM (max_auto_height, height);
|
||||
|
||||
gtk_widget_set_usize (gdisp->canvas,
|
||||
max_auto_width, max_auto_height);
|
||||
/* 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),
|
||||
width, height);
|
||||
gtk_widget_show(gdisp->shell);
|
||||
|
||||
/*printf("2w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
||||
width, height,
|
||||
|
@ -213,8 +219,6 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
shell_width, shell_height,
|
||||
border_x, border_y);fflush(stdout);*/
|
||||
|
||||
gtk_widget_show (gdisp->canvas);
|
||||
|
||||
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
||||
|
||||
shell_width = width + border_x;
|
||||
|
|
|
@ -131,8 +131,10 @@ gdisplay_close_window (GDisplay *gdisp,
|
|||
void
|
||||
gdisplay_shrink_wrap (GDisplay *gdisp)
|
||||
{
|
||||
/* FIXME: There's something wrong here - ..set_usize() seems to not
|
||||
be doing the right thing when it could... GTK problem? */
|
||||
/* FIXME: Still not perfect - have to hide and show the window to
|
||||
* get it to work. Adding a queue_resize to the shell doesn't
|
||||
* seem to help. Anyone have any good ideas here?
|
||||
*/
|
||||
gint x, y;
|
||||
gint disp_width, disp_height;
|
||||
gint width, height;
|
||||
|
@ -169,8 +171,11 @@ 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;
|
||||
|
||||
gtk_widget_set_usize (gdisp->canvas,
|
||||
width, height);
|
||||
/* 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),
|
||||
width, height);
|
||||
gtk_widget_show(gdisp->shell);
|
||||
|
||||
/*printf("1w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
||||
width, height,
|
||||
|
@ -178,8 +183,6 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
shell_width, shell_height,
|
||||
border_x, border_y);fflush(stdout);*/
|
||||
|
||||
gtk_widget_show (gdisp->canvas);
|
||||
|
||||
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
||||
|
||||
shell_width = width + border_x;
|
||||
|
@ -204,8 +207,11 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
max_auto_width = MINIMUM (max_auto_width, width);
|
||||
max_auto_height = MINIMUM (max_auto_height, height);
|
||||
|
||||
gtk_widget_set_usize (gdisp->canvas,
|
||||
max_auto_width, max_auto_height);
|
||||
/* 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),
|
||||
width, height);
|
||||
gtk_widget_show(gdisp->shell);
|
||||
|
||||
/*printf("2w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
||||
width, height,
|
||||
|
@ -213,8 +219,6 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
|
|||
shell_width, shell_height,
|
||||
border_x, border_y);fflush(stdout);*/
|
||||
|
||||
gtk_widget_show (gdisp->canvas);
|
||||
|
||||
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
||||
|
||||
shell_width = width + border_x;
|
||||
|
|
Loading…
Reference in New Issue