comparison gtk/dw.c @ 1472:1794caee0758

Initial versions of dw_window_set_gravity for Windows and OS/2. Fixed an error in the gravity calculation for bottom on GTK.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 20 Dec 2011 16:10:13 +0000
parents 26dbd11399d6
children 1d414e81a099
comparison
equal deleted inserted replaced
1471:26dbd11399d6 1472:1794caee0758
10429 newx = gdk_screen_width() - width - x; 10429 newx = gdk_screen_width() - width - x;
10430 /* Handle vertical center gravity */ 10430 /* Handle vertical center gravity */
10431 if((vert & 0xf) == DW_GRAV_CENTER) 10431 if((vert & 0xf) == DW_GRAV_CENTER)
10432 newy += ((gdk_screen_height() / 2) - (height / 2)); 10432 newy += ((gdk_screen_height() / 2) - (height / 2));
10433 else if((vert & 0xf) == DW_GRAV_BOTTOM) 10433 else if((vert & 0xf) == DW_GRAV_BOTTOM)
10434 newy = gdk_screen_height() - height - x; 10434 newy = gdk_screen_height() - height - y;
10435 } 10435 }
10436 if(GTK_WIDGET_MAPPED(handle)) 10436 if(GTK_WIDGET_MAPPED(handle))
10437 { 10437 {
10438 /* Finally move the window into place */ 10438 /* Finally move the window into place */
10439 gtk_window_move(GTK_WINDOW(handle), newx, newy); 10439 gtk_window_move(GTK_WINDOW(handle), newx, newy);