Mercurial > dwindows
comparison gtk3/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 | d76a36c9cff1 |
comparison
equal
deleted
inserted
replaced
1471:26dbd11399d6 | 1472:1794caee0758 |
---|---|
8807 newx = gdk_screen_width() - width - x; | 8807 newx = gdk_screen_width() - width - x; |
8808 /* Handle vertical center gravity */ | 8808 /* Handle vertical center gravity */ |
8809 if((vert & 0xf) == DW_GRAV_CENTER) | 8809 if((vert & 0xf) == DW_GRAV_CENTER) |
8810 newy += ((gdk_screen_height() / 2) - (height / 2)); | 8810 newy += ((gdk_screen_height() / 2) - (height / 2)); |
8811 else if((vert & 0xf) == DW_GRAV_BOTTOM) | 8811 else if((vert & 0xf) == DW_GRAV_BOTTOM) |
8812 newy = gdk_screen_height() - height - x; | 8812 newy = gdk_screen_height() - height - y; |
8813 } | 8813 } |
8814 /* Finally move the window into place */ | 8814 /* Finally move the window into place */ |
8815 gtk_window_move(GTK_WINDOW(handle), newx, newy); | 8815 gtk_window_move(GTK_WINDOW(handle), newx, newy); |
8816 } | 8816 } |
8817 else if((window = gtk_widget_get_window(handle))) | 8817 else if((window = gtk_widget_get_window(handle))) |