GUI: Removed ThemeEngine::getTabSpacing() and getTabPadding(); removed some dead code

svn-id: r35896
This commit is contained in:
Max Horn 2009-01-18 14:45:23 +00:00
parent 5e1cf1e166
commit 2bbbfdbee2
3 changed files with 2 additions and 24 deletions

View file

@ -47,10 +47,6 @@ TabWidget::TabWidget(GuiObject *boss, const String &name)
} }
void TabWidget::init() { void TabWidget::init() {
_tabOffset = 0; // TODO
_tabSpacing = g_gui.theme()->getTabSpacing();
_tabPadding = g_gui.theme()->getTabPadding();
setFlags(WIDGET_ENABLED); setFlags(WIDGET_ENABLED);
_type = kTabWidget; _type = kTabWidget;
_activeTab = -1; _activeTab = -1;
@ -185,8 +181,8 @@ void TabWidget::handleMouseDown(int x, int y, int button, int clickCount) {
// Determine which tab was clicked // Determine which tab was clicked
int tabID = -1; int tabID = -1;
if (x >= 0 && x % (_tabWidth + _tabSpacing) < _tabWidth) { if (x >= 0 && (x % _tabWidth) < _tabWidth) {
tabID = x / (_tabWidth + _tabSpacing); tabID = x / _tabWidth;
if (tabID >= (int)_tabs.size()) if (tabID >= (int)_tabs.size())
tabID = -1; tabID = -1;
} }
@ -242,10 +238,6 @@ void TabWidget::reflowLayout() {
int y = _butTP - _tabHeight; int y = _butTP - _tabHeight;
_navLeft->resize(x, y, _butW, _butH); _navLeft->resize(x, y, _butW, _butH);
_navRight->resize(x + _butW + 2, y, _butW, _butH); _navRight->resize(x + _butW + 2, y, _butW, _butH);
_tabOffset = 0; // TODO
_tabSpacing = g_gui.theme()->getTabSpacing();
_tabPadding = g_gui.theme()->getTabPadding();
} }
void TabWidget::drawWidget() { void TabWidget::drawWidget() {

View file

@ -46,9 +46,6 @@ protected:
int _tabWidth; int _tabWidth;
int _tabHeight; int _tabHeight;
int _tabOffset;
int _tabSpacing;
int _tabPadding;
int _titleVPad; int _titleVPad;
int _butRP, _butTP, _butW, _butH; int _butRP, _butTP, _butW, _butH;

View file

@ -554,17 +554,6 @@ private:
static Common::String getThemeId(const Common::String &filename); static Common::String getThemeId(const Common::String &filename);
static void listUsableThemes(Common::FSNode node, Common::List<ThemeDescriptor> &list, int depth=-1); static void listUsableThemes(Common::FSNode node, Common::List<ThemeDescriptor> &list, int depth=-1);
public:
/**
* @name LEGACY: Old GUI::Theme API
*/
//@{
int getTabSpacing() const { return 0; }
int getTabPadding() const { return 3; }
//@}
protected: protected:
OSystem *_system; /** Global system object. */ OSystem *_system; /** Global system object. */