summaryrefslogtreecommitdiff
path: root/src/corelib/x11
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-23 09:34:31 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-23 09:34:31 +0200
commitc9fb1258cd8cc37dba1b36f83ac92716dc544d6e (patch)
tree2f7eedfb2fc7a3b5dda3447eaa3bb8ddb5160605 /src/corelib/x11
parent5f610dc4bf2f56080cc88b253d5a8709cf906394 (diff)
downloadfpGUI-c9fb1258cd8cc37dba1b36f83ac92716dc544d6e.tar.xz
New WindowPosition setting of wpOneThirdDown.
Part of the "golden ratio" goodies. It seems to me more pleasing to the eye if a dialog is not 100% centered in the window, but rather 1/3 down of available vertical space. I think Mac OS X also does this.
Diffstat (limited to 'src/corelib/x11')
-rw-r--r--src/corelib/x11/fpg_x11.pas8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 3d3d3df9..09305c1e 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -1421,10 +1421,16 @@ begin
if waScreenCenterPos in FWindowAttributes then
begin
hints.flags := hints.flags or PPosition;
-
FLeft := (xapplication.ScreenWidth - FWidth) div 2;
FTop := (xapplication.ScreenHeight - FHeight) div 2;
DoMoveWindow(FLeft, FTop);
+ end
+ else if waOneThirdDownPos in FWindowAttributes then
+ begin
+ hints.flags := hints.flags or PPosition;
+ FLeft := (xapplication.ScreenWidth - FWidth) div 2;
+ FTop := (xapplication.ScreenHeight - FHeight) div 3;
+ DoMoveWindow(FLeft, FTop);
end;
if (FWindowType <> wtChild) and (waSizeable in FWindowAttributes) then