GUI: Got rid of the WidgetSize stuff

svn-id: r35022
This commit is contained in:
Max Horn 2008-11-12 13:14:44 +00:00
parent 190468c79a
commit 144be21bed
13 changed files with 1 additions and 29 deletions

View File

@ -864,11 +864,7 @@ void ValueDisplayDialog::reflowLayout() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
if (g_gui.getWidgetSize() == GUI::kBigWidgetSize) {
_percentBarWidth = kBigPercentBarWidth;
} else {
_percentBarWidth = kPercentBarWidth;
}
_percentBarWidth = screenW * 100 / 640;
int width = g_gui.getStringWidth(_label) + 16 + _percentBarWidth;
int height = g_gui.getFontHeight() + 4 * 2;

View File

@ -222,8 +222,6 @@ public:
protected:
enum {
kPercentBarWidth = 50,
kBigPercentBarWidth = 75,
kDisplayDelay = 1500
};
Common::String _label;

View File

@ -38,9 +38,6 @@ void ThemeEval::buildBuiltinVars() {
_builtin["kThumbnailWidth"] = kThumbnailWidth;
_builtin["kThumbnailHeight"] = kThumbnailHeight1;
_builtin["kThumbnailHeight2"] = kThumbnailHeight2;
_builtin["kNormalWidgetSize"] = GUI::kNormalWidgetSize;
_builtin["kBigWidgetSize"] = GUI::kBigWidgetSize;
}
void ThemeEval::reset() {

View File

@ -380,10 +380,6 @@ void NewGui::animateCursor() {
}
}
WidgetSize NewGui::getWidgetSize() {
return (WidgetSize)(g_gui.xmlEval()->getVar("Globals.WidgetSize"));
}
void NewGui::clearDragWidget() {
if (!_dialogStack.empty())
_dialogStack.top()->_dragWidget = 0;

View File

@ -88,8 +88,6 @@ public:
int getStringWidth(const Common::String &str, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getStringWidth(str, style); }
int getCharWidth(byte c, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getCharWidth(c, style); }
WidgetSize getWidgetSize();
void clearDragWidget();
void screenChange();

View File

@ -310,7 +310,6 @@
"<def var='Line.Height' value='16' /> "
"<def var='Font.Height' value='16' /> "
"<def var='TabLabelWidth' value='110' /> "
"<def var='WidgetSize' value='kBigWidgetSize' /> "
"<def var='About.OuterBorder' value='80'/> "
"<def var='PopUpWidget.labelSpacing' value='10' /> "
"<def var='Layout.Spacing' value='8' /> "
@ -925,7 +924,6 @@
"<def var='Line.Height' value='12' /> "
"<def var='Font.Height' value='10' /> "
"<def var='TabLabelWidth' value='100' /> "
"<def var='WidgetSize' value='kNormalWidgetSize' /> "
"<def var='About.OuterBorder' value='10'/> "
"<def var='PopUpWidget.labelSpacing' value='6' /> "
"<def var='Layout.Spacing' value='8'/> "

Binary file not shown.

View File

@ -29,7 +29,6 @@
<def var = 'Font.Height' value = '16' />
<def var = 'TabLabelWidth' value = '110' />
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def var = 'About.OuterBorder' value = '80'/>
<def var = 'PopUpWidget.labelSpacing' value = '10' />

View File

@ -29,7 +29,6 @@
<def var = 'Font.Height' value = '10' />
<def var = 'TabLabelWidth' value = '100' />
<def var = 'WidgetSize' value = 'kNormalWidgetSize' />
<def var = 'About.OuterBorder' value = '10'/>
<def var = 'PopUpWidget.labelSpacing' value = '6' />

Binary file not shown.

View File

@ -29,8 +29,6 @@
<def var = 'Font.Height' value = '16' />
<def var = 'TabLabelWidth' value = '110' />
<def var = 'WidgetSize' value = 'kBigWidgetSize' />
<def var = 'Padding.Bottom' value = '16' />
<def var = 'Padding.Left' value = '16' />
<def var = 'Padding.Right' value = '16' />

View File

@ -29,7 +29,6 @@
<def var = 'Font.Height' value = '10' />
<def var = 'TabLabelWidth' value = '100' />
<def var = 'WidgetSize' value = 'kNormalWidgetSize' />
<def var = 'About.OuterBorder' value = '10'/>
<def var = 'PopUpWidget.labelSpacing' value = '6' />

View File

@ -66,12 +66,6 @@ enum {
kCaretBlinkTime = 300
};
enum WidgetSize {
kDefaultWidgetSize,
kNormalWidgetSize,
kBigWidgetSize
};
/* Widget */
class Widget : public GuiObject {
friend class Dialog;