summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/tab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs/tab.cpp')
-rw-r--r--src/gui/widgets/tabs/tab.cpp55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 8c25e7b1d..733d030d2 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -215,47 +215,44 @@ void Tab::draw(gcn::Graphics *graphics)
Graphics *const g = static_cast<Graphics*>(graphics);
- if (skin)
+ // draw tab
+ if (openGLMode != RENDER_SAFE_OPENGL)
{
- // draw tab
- if (openGLMode != RENDER_SAFE_OPENGL)
+ const ImageRect &rect = skin->getBorder();
+ if (mRedraw || mode != mMode || g->getRedraw())
{
- const ImageRect &rect = skin->getBorder();
- if (mRedraw || mode != mMode || g->getRedraw())
- {
- mMode = mode;
- mRedraw = false;
- mVertexes->clear();
- g->calcWindow(mVertexes, 0, 0,
- mDimension.width, mDimension.height, rect);
-
- if (mImage)
- {
- const Skin *const skin1 = tabImg[TAB_STANDARD];
- if (skin1)
- {
- const int padding = skin1->getPadding();
- g->calcTile(mVertexes, mImage, padding, padding);
- }
- }
- }
+ mMode = mode;
+ mRedraw = false;
+ mVertexes->clear();
+ g->calcWindow(mVertexes, 0, 0,
+ mDimension.width, mDimension.height, rect);
- g->drawTile(mVertexes);
- }
- else
- {
- g->drawImageRect(0, 0,
- mDimension.width, mDimension.height, skin->getBorder());
if (mImage)
{
const Skin *const skin1 = tabImg[TAB_STANDARD];
if (skin1)
{
const int padding = skin1->getPadding();
- g->drawImage(mImage, padding, padding);
+ g->calcTile(mVertexes, mImage, padding, padding);
}
}
}
+
+ g->drawTile(mVertexes);
+ }
+ else
+ {
+ g->drawImageRect(0, 0,
+ mDimension.width, mDimension.height, skin->getBorder());
+ if (mImage)
+ {
+ const Skin *const skin1 = tabImg[TAB_STANDARD];
+ if (skin1)
+ {
+ const int padding = skin1->getPadding();
+ g->drawImage(mImage, padding, padding);
+ }
+ }
}
drawChildren(graphics);