summaryrefslogtreecommitdiff
path: root/src
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
parent99a07142cccf792dd35b611edd1b41cb307b5847 (diff)
downloadmv-696a646491afcaf27f76cf976d4987e88cec50a2.tar.gz
mv-696a646491afcaf27f76cf976d4987e88cec50a2.tar.bz2
mv-696a646491afcaf27f76cf976d4987e88cec50a2.tar.xz
mv-696a646491afcaf27f76cf976d4987e88cec50a2.zip
improve draw speed in tab.
Diffstat (limited to 'src')
-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);
+ }
+ }
}
}