diff options
| author | Johannes Schickel | 2009-07-15 22:19:16 +0000 |
|---|---|---|
| committer | Johannes Schickel | 2009-07-15 22:19:16 +0000 |
| commit | 5e38ecbdcbbb4fc0de90137b63fe3979d5d5fcd6 (patch) | |
| tree | 1287598a39f3d00dd53e079c823fc582b5d75de6 /gui | |
| parent | caae53a25a15983e98936f9b6f182b49d3062ccf (diff) | |
| download | scummvm-rg350-5e38ecbdcbbb4fc0de90137b63fe3979d5d5fcd6.tar.gz scummvm-rg350-5e38ecbdcbbb4fc0de90137b63fe3979d5d5fcd6.tar.bz2 scummvm-rg350-5e38ecbdcbbb4fc0de90137b63fe3979d5d5fcd6.zip | |
Fix ugly spacing between tabs in classic theme (as reported by sunmax on -devel).
svn-id: r42517
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/ThemeEngine.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 49ea2e19f3..3cf64809fc 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -996,23 +996,20 @@ void ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, co if (!ready()) return; - const int tabOffset = 2; - tabWidth -= tabOffset; - queueDD(kDDTabBackground, Common::Rect(r.left, r.top, r.right, r.top + tabHeight)); for (int i = 0; i < (int)tabs.size(); ++i) { if (i == active) continue; - Common::Rect tabRect(r.left + i * (tabWidth + tabOffset), r.top, r.left + i * (tabWidth + tabOffset) + tabWidth, r.top + tabHeight); + Common::Rect tabRect(r.left + i * tabWidth, r.top, r.left + (i + 1) * tabWidth, r.top + tabHeight); queueDD(kDDTabInactive, tabRect); queueDDText(getTextData(kDDTabInactive), tabRect, tabs[i], false, false, _widgets[kDDTabInactive]->_textAlignH, _widgets[kDDTabInactive]->_textAlignV); } if (active >= 0) { - Common::Rect tabRect(r.left + active * (tabWidth + tabOffset), r.top, r.left + active * (tabWidth + tabOffset) + tabWidth, r.top + tabHeight); - const uint16 tabLeft = active * (tabWidth + tabOffset); + Common::Rect tabRect(r.left + active * tabWidth, r.top, r.left + (active + 1) * tabWidth, r.top + tabHeight); + const uint16 tabLeft = active * tabWidth; const uint16 tabRight = MAX(r.right - tabRect.right, 0); queueDD(kDDTabActive, tabRect, (tabLeft << 16) | (tabRight & 0xFFFF)); queueDDText(getTextData(kDDTabActive), tabRect, tabs[active], false, false, _widgets[kDDTabActive]->_textAlignH, _widgets[kDDTabActive]->_textAlignV); |
