summaryrefslogtreecommitdiff
path: root/src/gui/widgets/desktop.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-19 19:59:48 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-19 19:59:48 +0300
commit0c8c3d955b1a481f6900723ad8f43d074190aa7d (patch)
tree595ac25ef65f352fb8b74394e552b0c7276daa53 /src/gui/widgets/desktop.cpp
parent77e86790554d3a8cdad5b6d7df0d6171841e2229 (diff)
downloadmanaverse-0c8c3d955b1a481f6900723ad8f43d074190aa7d.tar.gz
manaverse-0c8c3d955b1a481f6900723ad8f43d074190aa7d.tar.bz2
manaverse-0c8c3d955b1a481f6900723ad8f43d074190aa7d.tar.xz
manaverse-0c8c3d955b1a481f6900723ad8f43d074190aa7d.zip
Use staticbrowserbox in desktop.
Diffstat (limited to 'src/gui/widgets/desktop.cpp')
-rw-r--r--src/gui/widgets/desktop.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index a1111b7ae..87eb14c48 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -26,7 +26,7 @@
#include "gui/skin.h"
-#include "gui/widgets/browserbox.h"
+#include "gui/widgets/staticbrowserbox.h"
#include "input/inputmanager.h"
@@ -52,7 +52,7 @@ Desktop::Desktop(const Widget2 *const widget) :
LinkHandler(),
WidgetListener(),
mWallpaper(nullptr),
- mVersionLabel(new BrowserBox(this, BrowserBoxMode::AUTO_WRAP, Opaque_false,
+ mVersionLabel(new StaticBrowserBox(this, Opaque_false,
"browserbox.xml")),
mSkin(nullptr),
mBackgroundGrayColor(getThemeColor(ThemeColorId::BACKGROUND_GRAY)),
@@ -83,6 +83,7 @@ Desktop::Desktop(const Widget2 *const widget) :
mVersionLabel->addRow("copyright",
"(C) ManaPlus developers, http://manaplus.org");
mVersionLabel->setLinkHandler(this);
+ mVersionLabel->updateHeight();
}
Desktop::~Desktop()
@@ -101,8 +102,8 @@ void Desktop::postInit()
if (mSkin != nullptr)
{
addXY(mVersionLabel,
- mSkin->getOption("versionX", 25),
- mSkin->getOption("versionY", 2));
+ mSkin->getOption("versionX", 25),
+ mSkin->getOption("versionY", 2));
}
else
{
@@ -119,7 +120,7 @@ void Desktop::reloadWallpaper()
void Desktop::widgetResized(const Event &event A_UNUSED)
{
mVersionLabel->setSize(getWidth(), getHeight());
- mVersionLabel->updateSize(true);
+ mVersionLabel->updateHeight();
setBestFittingWallpaper();
}