aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-08-07 08:16:16 +0000
committerjmarshallnz <jmarshallnz@svn>2010-08-07 08:16:16 +0000
commitfa27a308bfbcc228785d02df454c1b1f71f437fd (patch)
tree03090b21b21a86daf7c81c47e4632b2dd455d5aa /guilib
parent3077c582e4899f6dd92a95da859dd5b0c9aa5794 (diff)
cleanup: Removed unused ScaleElement function
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@32571 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIControlFactory.cpp47
-rw-r--r--guilib/GUIControlFactory.h1
2 files changed, 0 insertions, 48 deletions
diff --git a/guilib/GUIControlFactory.cpp b/guilib/GUIControlFactory.cpp
index 463162d429..804640025e 100644
--- a/guilib/GUIControlFactory.cpp
+++ b/guilib/GUIControlFactory.cpp
@@ -1354,50 +1354,3 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl
}
return control;
}
-
-void CGUIControlFactory::ScaleElement(TiXmlElement *element, RESOLUTION fileRes, RESOLUTION destRes)
-{
- if (element->FirstChild())
- {
- const char *value = element->FirstChild()->Value();
- if (value)
- {
- float v = (float)atof(value);
- CStdString name = element->Value();
- if (name == "posx" ||
- name == "width" ||
- name == "textoffsetx" ||
- name == "textwidth" ||
- name == "spinwidth" ||
- name == "spinposx" ||
- name == "markwidth" ||
- name == "sliderwidth" ||
- name == "radiowidth" ||
- name == "radioposx")
- {
- // scale
- v *= (float)g_settings.m_ResInfo[destRes].iWidth / g_settings.m_ResInfo[fileRes].iWidth;
- CStdString floatValue;
- floatValue.Format("%f", v);
- element->FirstChild()->SetValue(floatValue);
- }
- else if (name == "posy" ||
- name == "height" ||
- name == "textoffsety" ||
- name == "spinheight" ||
- name == "spinposy" ||
- name == "markheight" ||
- name == "sliderheight" ||
- name == "buttongap" || // should really depend on orientation
- name == "radioheight" ||
- name == "radioposy")
- {
- // scale
- v *= (float)g_settings.m_ResInfo[destRes].iHeight / g_settings.m_ResInfo[fileRes].iHeight;
- CStdString floatValue;
- floatValue.Format("%f", v);
- element->FirstChild()->SetValue(floatValue);
- }
- }
- }
-}
diff --git a/guilib/GUIControlFactory.h b/guilib/GUIControlFactory.h
index e61b42f247..e8060c2188 100644
--- a/guilib/GUIControlFactory.h
+++ b/guilib/GUIControlFactory.h
@@ -46,7 +46,6 @@ public:
CGUIControlFactory(void);
virtual ~CGUIControlFactory(void);
CGUIControl* Create(int parentID, const CRect &rect, TiXmlElement* pControlNode, bool insideContainer = false);
- void ScaleElement(TiXmlElement *element, RESOLUTION fileRes, RESOLUTION destRes);
/*! \brief translate from control name to control type
\param type name of the control