From 819d8644a8d905635dd69da5aa2a3a54a9bc9e8d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Feb 2012 15:32:21 +0300 Subject: Rearrange text in server dialog servers list. --- src/gui/serverdialog.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index cf2c3f0f9..216efc625 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -183,20 +183,24 @@ public: graphics->setColor(mTextColor); int top; + int x = 2; if (!info.name.empty()) { graphics->setFont(boldFont); + x += boldFont->getWidth(info.name) + 15; graphics->drawText(info.name, 2, y); - top = y + height / 2; + top = y + boldFont->getHeight() + 2; } else { - top = y + height / 4; + top = y + height / 4 + 2; } graphics->setFont(getFont()); + if (!info.description.empty()) + graphics->drawText(info.description, x, y); graphics->drawText(model->getElementAt(i), 2, top); if (info.version.first > 0) @@ -211,7 +215,7 @@ public: unsigned int getRowHeight() const { - return 2 * getFont()->getHeight(); + return 2 * getFont()->getHeight() + 5; } private: gcn::Color mHighlightColor; -- cgit v1.2.3-70-g09d2