diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-15 04:22:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-15 04:22:11 +0300 |
commit | c91bc5201596eda73f9df2222d76d9f413426a85 (patch) | |
tree | cbdcf7fb76eee35baf7265e5c04da2f13633ab5d /src/guichan/widgets/tab.cpp | |
parent | 255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3 (diff) | |
download | manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.gz manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.bz2 manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.xz manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.zip |
Remove some diplicated code from embeded guichan.
Diffstat (limited to 'src/guichan/widgets/tab.cpp')
-rw-r--r-- | src/guichan/widgets/tab.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/guichan/widgets/tab.cpp b/src/guichan/widgets/tab.cpp index 1a3df3ede..9b7424748 100644 --- a/src/guichan/widgets/tab.cpp +++ b/src/guichan/widgets/tab.cpp @@ -105,69 +105,6 @@ namespace gcn return mLabel->getCaption(); } - void Tab::draw(Graphics *graphics) - { - const Color &faceColor = getBaseColor(); - const int alpha = getBaseColor().a; - Color highlightColor = faceColor + 0x303030; - highlightColor.a = alpha; - Color shadowColor = faceColor - 0x303030; - shadowColor.a = alpha; - - Color borderColor; - Color baseColor; - - if ((mTabbedArea != NULL && mTabbedArea->isTabSelected(this)) - || mHasMouse) - { - // Draw a border. - graphics->setColor(highlightColor); - 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); - - borderColor = highlightColor; - baseColor = getBaseColor(); - } - else - { - // Draw a border. - 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); - - baseColor = getBaseColor() - 0x151515; - baseColor.a = alpha; - } - - // 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)); - const Rectangle currentClipArea = graphics->getCurrentClipArea(); - - graphics->setColor(baseColor); - graphics->fillRectangle(Rectangle(0, 0, - currentClipArea.width, currentClipArea.height)); - - drawChildren(graphics); - - if (mTabbedArea != NULL - && mTabbedArea->isFocused() - && mTabbedArea->isTabSelected(this)) - { - graphics->setColor(Color(0x000000)); - graphics->drawRectangle(Rectangle(2, 2, - currentClipArea.width - 4, currentClipArea.height - 4)); - } - - graphics->popClipArea(); - } - void Tab::mouseEntered(MouseEvent& mouseEvent A_UNUSED) { mHasMouse = true; |