From b67c1813727cbc913eb063dea48ca109844f52fe Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 10 Feb 2009 00:40:06 +0100 Subject: Center the dialogs during the login sequence again --- src/main.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a9206505..97f2a277 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -649,16 +649,11 @@ void accountLogin(Network *network, LoginData *loginData) config.setValue("remember", loginData->remember); } -inline int MIN(int x, int y) -{ - return x < y ? x : y; -} - -void positionDialog(Window *dialog, int screenWidth, int screenHeight) +static void positionDialog(Window *dialog, int screenWidth, int screenHeight) { dialog->setPosition( - MIN(screenWidth * 5 / 8, screenWidth - dialog->getWidth()), - MIN(screenHeight * 5 / 8, screenHeight - dialog->getHeight())); + (screenWidth - dialog->getWidth()) / 2, + (screenHeight - dialog->getHeight()) / 2); } void charLogin(Network *network, LoginData *loginData) -- cgit v1.2.3-70-g09d2