summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/tab.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-31 01:27:37 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-31 01:27:37 +0300
commit9d3b975bcb84ad1c61d628de2804751c0d0707dd (patch)
treefe7494b1ecd561a40dc96d088c77d69b6d4ce13e /src/guichan/widgets/tab.cpp
parent1d0044cbc81e547ad688a295288910d58e1a3fb1 (diff)
downloadManaVerse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.gz
ManaVerse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.bz2
ManaVerse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.tar.xz
ManaVerse-9d3b975bcb84ad1c61d628de2804751c0d0707dd.zip
Fix code style and missing members initialisations.
Diffstat (limited to 'src/guichan/widgets/tab.cpp')
-rw-r--r--src/guichan/widgets/tab.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/guichan/widgets/tab.cpp b/src/guichan/widgets/tab.cpp
index f6283dfe6..760e77a18 100644
--- a/src/guichan/widgets/tab.cpp
+++ b/src/guichan/widgets/tab.cpp
@@ -55,9 +55,9 @@
namespace gcn
{
- Tab::Tab()
- :mHasMouse(false),
- mTabbedArea(NULL)
+ Tab::Tab() :
+ mHasMouse(false),
+ mTabbedArea(NULL)
{
mLabel = new Label();
mLabel->setPosition(4, 4);
@@ -77,9 +77,7 @@ namespace gcn
mLabel->getHeight() + 8);
if (mTabbedArea != NULL)
- {
mTabbedArea->adjustTabPositions();
- }
}
void Tab::setTabbedArea(TabbedArea* tabbedArea)
@@ -124,7 +122,8 @@ namespace gcn
graphics->drawLine(0, 0, getWidth() - 1, 0);
graphics->drawLine(0, 1, 0, getHeight() - 1);
graphics->setColor(shadowColor);
- graphics->drawLine(getWidth() - 1, 1, getWidth() - 1, getHeight() - 1);
+ graphics->drawLine(getWidth() - 1, 1,
+ getWidth() - 1, getHeight() - 1);
borderColor = highlightColor;
baseColor = getBaseColor();
@@ -135,7 +134,8 @@ namespace gcn
graphics->setColor(shadowColor);
graphics->drawLine(0, 0, getWidth() - 1, 0);
graphics->drawLine(0, 1, 0, getHeight() - 1);
- graphics->drawLine(getWidth() - 1, 1, getWidth() - 1, getHeight() - 1);
+ graphics->drawLine(getWidth() - 1, 1, getWidth() - 1,
+ getHeight() - 1);
baseColor = getBaseColor() - 0x151515;
baseColor.a = alpha;
@@ -143,14 +143,13 @@ namespace gcn
// Push a clip area so the other drawings don't need to worry
// about the border.
- graphics->pushClipArea(Rectangle(1, 1, getWidth() - 2, getHeight() - 1));
+ graphics->pushClipArea(Rectangle(1, 1,
+ getWidth() - 2, getHeight() - 1));
const Rectangle currentClipArea = graphics->getCurrentClipArea();
graphics->setColor(baseColor);
- graphics->fillRectangle(Rectangle(0,
- 0,
- currentClipArea.width,
- currentClipArea.height));
+ graphics->fillRectangle(Rectangle(0, 0,
+ currentClipArea.width, currentClipArea.height));
drawChildren(graphics);
@@ -159,10 +158,8 @@ namespace gcn
&& mTabbedArea->isTabSelected(this))
{
graphics->setColor(Color(0x000000));
- graphics->drawRectangle(Rectangle(2,
- 2,
- currentClipArea.width - 4,
- currentClipArea.height - 4));
+ graphics->drawRectangle(Rectangle(2, 2,
+ currentClipArea.width - 4, currentClipArea.height - 4));
}
graphics->popClipArea();