diff options
-rw-r--r-- | guilib/GUIControlFactory.cpp | 47 | ||||
-rw-r--r-- | guilib/GUIControlFactory.h | 1 |
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 |