summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-16 00:38:35 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-16 00:38:35 +0300
commitb60342aea4b84f435a97c3fbb70984dcc4ec30b8 (patch)
tree5c020ab6edb13232e6e9ddde04e70e835ca5fdfa /src/gui
parentf4af4cc1e21d95c6fed8245466bb589dbd7900b7 (diff)
downloadmanaverse-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.gz
manaverse-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.bz2
manaverse-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.xz
manaverse-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.zip
Fix ministatus window size and bars positions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ministatuswindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index 64da94389..427b0fe50 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -152,7 +152,7 @@ ProgressBar *MiniStatusWindow::createBar(const float progress,
void MiniStatusWindow::updateBars()
{
- int x = mPadding;
+ int x = 0;
const ProgressBar *lastBar = nullptr;
for (std::vector <ProgressBar*>::const_iterator it = mBars.begin(),
it_end = mBars.end(); it != it_end; ++it)
@@ -167,7 +167,7 @@ void MiniStatusWindow::updateBars()
continue;
if (bar->isVisible())
{
- bar->setPosition(x, mPadding);
+ bar->setPosition(x, 0);
add(bar);
x += bar->getWidth() + mSpacing;
lastBar = bar;
@@ -176,9 +176,8 @@ void MiniStatusWindow::updateBars()
if (lastBar)
{
- const int pad2 = 2 * mPadding;
- setContentSize(lastBar->getX() + lastBar->getWidth() + pad2,
- lastBar->getY() + lastBar->getHeight() + pad2);
+ setContentSize(lastBar->getX() + lastBar->getWidth(),
+ lastBar->getY() + lastBar->getHeight());
}
}
@@ -490,6 +489,7 @@ void MiniStatusWindow::updateArrows()
gcn::Rectangle MiniStatusWindow::getChildrenArea()
{
- return gcn::Rectangle(getPadding(), 0, getWidth() - getPadding() * 2,
- getHeight() - getPadding() * 2);
+ return gcn::Rectangle(getPadding(), getPadding(),
+ getWidth() - getPadding() * 2,
+ getHeight() - getPadding() * 2);
}