Jump to content


Photo

eListboxPythonStringContent


  • Please log in to reply
7 replies to this topic

#1 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 11:01

I need a little help.

With the 1920x1080 framebuffer support we will have soon skin full hd

So skinners need to set bigger fonts and itemheight

 

But eListboxPythonStringContent object seems to accept only the parameter setFont and seems to ignore setItemHeight

 

looking at source elistboxcontent.cpp we have the value fixed in the class declaration:

eListboxPythonStringContent::eListboxPythonStringContent()
    :m_cursor(0), m_itemheight(25)

 

So i tried to add the function setItemHeight to the converter and the class using this patch in attach

But again the setItemHeight setting is ignored.

 

Have you any idea howto solve ?

Attached Files


Edited by bacicciosat, 11 November 2014 - 11:01.


Re: eListboxPythonStringContent #2 littlesat

  • PLi® Core member
  • 56,268 posts

+691
Excellent

Posted 11 November 2014 - 11:56

I suggest you should give an itemheight in the skin definition and forward that value to cpp via python... Just like you set fonts...
But now I see here how you should in fact do this task :)

Edited by littlesat, 11 November 2014 - 11:56.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: eListboxPythonStringContent #3 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 12:00

yes this is exactly what i have made.

But it doesn't work.



Re: eListboxPythonStringContent #4 littlesat

  • PLi® Core member
  • 56,268 posts

+691
Excellent

Posted 11 November 2014 - 12:14

Then I do not understand what you did in python here...? Is this code ever called?
Did yoy uograde enigma2.py? So it is able to swig.

Edited by littlesat, 11 November 2014 - 12:15.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: eListboxPythonStringContent #5 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 12:19

the code is called in the skin:

<widget source="list" render="Listbox" font="Regular;40" itemHeight="60" position="80,290" size="710,300" scrollbarMode="showOnDemand" selectionPixmap="skin_default/icons/listselection710x25-fs8.png"  transparent="1">
            <convert type="StringList"/>
        </widget>

the skin call the function self.content.setItemHeight(self.source.item_height) in StringList.py

this function call the function: void eListboxPythonStringContent::setItemHeight(int height) in eListboxContent.cpp

 

But there is no effect.

 

You can check also in Pli i think. There is no way to change ItemHeight in StringList.



Re: eListboxPythonStringContent #6 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 13:08

I will try to remove the m_itemheight value from class declaration



Re: eListboxPythonStringContent #7 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 15:24

Then I do not understand what you did in python here...? Is this code ever called?
Did yoy uograde enigma2.py? So it is able to swig.

 

Yes of course i upgraded all.

The fact is that we should not need this patch to set ItemHeight.

The function setItemHeight should work in every case because it inerhit from the main class and source (listbox) exactly like setFont that is not defined inside stringlist but works.



Re: eListboxPythonStringContent #8 bacicciosat

  • Senior Member
  • 540 posts

+100
Excellent

Posted 11 November 2014 - 21:55

ok the c++ side of the patch is ok

The error is in this line in StringList.py

self.content.setItemHeight(self.source.item_height)

self.source.item_height is always 25 and don't pick the value from the skin.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users