summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-16 16:24:01 +0000
committerDana Jansens <danakj@orodu.net>2003-02-16 16:24:01 +0000
commit8269fc2b3965d12ba308caa554bfa7ee037fba13 (patch)
treef6af0d50a13fe56050fe3b3f63369b33e6f4ebcd /otk
parente07ea8486556349ee0a312fd4c6bc0e5aa2de4f9 (diff)
set the gravity to center the dialog.
size it off the minSize which is already calculated, not off the size() with is nto
Diffstat (limited to 'otk')
-rw-r--r--otk/messagedialog.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/otk/messagedialog.cc b/otk/messagedialog.cc
index b1f6c61a..2c06e63a 100644
--- a/otk/messagedialog.cc
+++ b/otk/messagedialog.cc
@@ -133,11 +133,12 @@ void MessageDialog::show()
r = Rect(Point(0, 0), display->screenInfo(screen())->size());
XSizeHints size;
- size.flags = PMinSize | PPosition;
+ size.flags = PMinSize | PPosition | PWinGravity;
size.min_width = minSize().width();
size.min_height = minSize().height();
+ size.win_gravity = CenterGravity;
- Size dest = area().size();
+ Size dest = minSize();
if (dest.width() < 200 || dest.height() < 100) {
if (dest.width() < 200 && dest.height() < 100) dest = Size(200, 100);
else if (dest.width() < 200) dest = Size(200, dest.height());