From 584fdb3fd5a157d0768d9f4782a035a239bd010a Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 13 Mar 2010 12:08:56 -0700 Subject: Fix button overlap issues in login dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- src/gui/login.cpp | 2 +- src/gui/serverdialog.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 9eb3f2c0..78914475 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -76,7 +76,7 @@ LoginDialog::LoginDialog(LoginData *loginData): place(0, 6, mRegisterButton).setHAlign(LayoutCell::LEFT); place(2, 6, mServerButton); place(3, 6, mLoginButton); - reflowLayout(250, 0); + reflowLayout(); addKeyListener(this); diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index dd34a24e..eb6e9b4b 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -189,7 +189,17 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir): // Make sure the list has enough height getLayout().setRowHeight(3, 80); - reflowLayout(300, 0); + // Do this manually instead of calling reflowLayout so we can enforce a + // minimum width. + int width = 0, height = 0; + getLayout().reflow(width, height); + if (width < 300) + { + width = 300; + getLayout().reflow(width, height); + } + + setContentSize(width, height); addKeyListener(this); -- cgit v1.2.3-70-g09d2