diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-16 00:38:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-16 00:38:35 +0300 |
commit | b60342aea4b84f435a97c3fbb70984dcc4ec30b8 (patch) | |
tree | 5c020ab6edb13232e6e9ddde04e70e835ca5fdfa /src/gui | |
parent | f4af4cc1e21d95c6fed8245466bb589dbd7900b7 (diff) | |
download | plus-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.gz plus-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.bz2 plus-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.tar.xz plus-b60342aea4b84f435a97c3fbb70984dcc4ec30b8.zip |
Fix ministatus window size and bars positions.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/ministatuswindow.cpp | 14 |
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); } |