diff options
author | jurkan <jurkan@gmx.de> | 2012-05-06 22:58:56 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-05-07 22:37:37 +0200 |
commit | ef9a76581386524f43b547f046b7e41b769c415e (patch) | |
tree | bf5ca96384aeb5161957eeb026a4de7f0e68de40 | |
parent | 86154175f63a7f1a4b73b3727314ac760d83834e (diff) | |
download | mana-ef9a76581386524f43b547f046b7e41b769c415e.tar.gz mana-ef9a76581386524f43b547f046b7e41b769c415e.tar.bz2 mana-ef9a76581386524f43b547f046b7e41b769c415e.tar.xz mana-ef9a76581386524f43b547f046b7e41b769c415e.zip |
Fixed wrong offset values for tab widget drawing
Mantis-Issue: 423
Reviewed-by: Thorbjørn Lindeijer
-rw-r--r-- | src/gui/widgets/tab.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index e5b37e11..17b7108f 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -49,15 +49,15 @@ enum { struct TabData { char const *file; - int gridX; - int gridY; + int gridX[4]; + int gridY[4]; }; static TabData const data[TAB_COUNT] = { - { "tab.png", 0, 0 }, - { "tab_hilight.png", 9, 4 }, - { "tabselected.png", 16, 19 }, - { "tab.png", 25, 23 } + { "tab.png", {0, 9, 16, 25}, {0, 13, 19, 20} }, + { "tab_hilight.png", {0, 9, 16, 25}, {0, 13, 19, 20} }, + { "tabselected.png", {0, 9, 16, 25}, {0, 4, 12, 20} }, + { "tab.png", {0, 9, 16, 25}, {0, 13, 19, 20} } }; ImageRect Tab::tabImg[TAB_COUNT]; @@ -103,9 +103,9 @@ void Tab::init() for (x = 0; x < 3; x++) { tabImg[mode].grid[a] = tab[mode]->getSubImage( - data[x].gridX, data[y].gridY, - data[x + 1].gridX - data[x].gridX + 1, - data[y + 1].gridY - data[y].gridY + 1); + data[mode].gridX[x], data[mode].gridY[y], + data[mode].gridX[x + 1] - data[mode].gridX[x] + 1, + data[mode].gridY[y + 1] - data[mode].gridY[y] + 1); tabImg[mode].grid[a]->setAlpha(mAlpha); a++; } |