itemheight is now a property of the listbox content
[enigma2.git] / lib / gui / elistboxcontent.cpp
index 621fa5cc907b0a33549d414c7891a9ede769f084..4fa5a65ed2f2233ae2e350a6e9845b7912fdf6d8 100644 (file)
@@ -37,6 +37,7 @@ iListboxContent::iListboxContent(): m_listbox(0)
 void iListboxContent::setListbox(eListbox *lb)
 {
        m_listbox = lb;
+       m_listbox->setItemHeight(getItemHeight());
 }
 
 int iListboxContent::currentCursorSelectable()
@@ -48,7 +49,7 @@ int iListboxContent::currentCursorSelectable()
 
 DEFINE_REF(eListboxPythonStringContent);
 
-eListboxPythonStringContent::eListboxPythonStringContent()
+eListboxPythonStringContent::eListboxPythonStringContent(): m_itemheight(25)
 {
 }
 
@@ -661,3 +662,10 @@ void eListboxPythonMultiContent::setFont(int fnt, gFont *font)
        else
                m_font.erase(fnt);
 }
+
+void eListboxPythonMultiContent::setItemHeight(int height)
+{
+       m_itemheight = height;
+       if (m_listbox)
+               m_listbox->setItemHeight(height);
+}