summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-02 22:11:48 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-02 22:11:48 +0300
commit696a646491afcaf27f76cf976d4987e88cec50a2 (patch)
treef2e6cf8aa4a048d15cd99452919f850b8e96123c /src/gui/widgets
parent99a07142cccf792dd35b611edd1b41cb307b5847 (diff)
downloadplus-696a646491afcaf27f76cf976d4987e88cec50a2.tar.gz
plus-696a646491afcaf27f76cf976d4987e88cec50a2.tar.bz2
plus-696a646491afcaf27f76cf976d4987e88cec50a2.tar.xz
plus-696a646491afcaf27f76cf976d4987e88cec50a2.zip
improve draw speed in tab.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tab.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index f1dc59c60..643a5ff92 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -231,6 +231,16 @@ void Tab::draw(gcn::Graphics *graphics)
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);
+ }
+ }
}
g->drawTile(mVertexes);
@@ -239,16 +249,15 @@ void Tab::draw(gcn::Graphics *graphics)
{
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);
+ if (mImage)
+ {
+ const Skin *const skin1 = tabImg[TAB_STANDARD];
+ if (skin1)
+ {
+ const int padding = skin1->getPadding();
+ g->drawImage(mImage, padding, padding);
+ }
+ }
}
}