summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/serverdialog.cpp4
-rw-r--r--src/gui/skilldialog.cpp2
-rw-r--r--src/gui/widgets/sliderlist.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 926b9332a..c8555650f 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -613,6 +613,8 @@ void ServerDialog::loadServers(const bool addNew)
else
version = strprintf(_("requires v%s"), version.c_str());
+ gcn::Font *font = gui->getFont();
+
for_each_xml_child_node(subNode, serverNode)
{
if (xmlNameEqual(subNode, "connection"))
@@ -641,7 +643,7 @@ void ServerDialog::loadServers(const bool addNew)
}
}
- server.version.first = gui->getFont()->getWidth(version);
+ server.version.first = font->getWidth(version);
server.version.second = version;
MutexLocker tempLock(&mMutex);
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index deefdbd77..8718cc470 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -102,7 +102,7 @@ class SkillListBox final : public ListBox
mTextPadding(mSkin ? mSkin->getOption("textPadding", 34) : 34),
mSpacing(mSkin ? mSkin->getOption("spacing", 0) : 0)
{
- mRowHeight = mainGraphics->getFont()->getHeight() * 2
+ mRowHeight = getFont()->getHeight() * 2
+ mSpacing + 2 * mPadding;
if (mRowHeight < 34)
mRowHeight = 34;
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp
index d57b1a092..019755576 100644
--- a/src/gui/widgets/sliderlist.cpp
+++ b/src/gui/widgets/sliderlist.cpp
@@ -210,7 +210,7 @@ int SliderList::getMaxLabelWidth()
return 1;
int maxWidth = 0;
- const SDLFont *const font = gui->getFont();
+ const gcn::Font *const font = getFont();
const int num = mListModel->getNumberOfElements();
for (int f = 0; f < num; f ++)