To simplify skin.xml there is now a patch so all colour buttons (graphics and text) can be created by one single widget once in the whole skin. No need for all those silly templates. Fully automatic. And backwards compatible. Is PLi interested?
Skin: all colour buttons in one widget
Re: Skin: all colour buttons in one widget #2
Posted 30 October 2023 - 12:37
Of course OpenPLi is interested in such additions, especially if they can be added without side effects..
Aan de rand van de afgrond is een stap voorwaarts niet altijd vooruitgang....
On the edge of the abyss, a step forward is not always progress....
Hardware: 2x Daily used Vu+ Ultimo 4K - Vu+ Duo 4K SE and a lot more.... - VisioSat BiBigsat - Jultec Unicable Multiswitch 4 positions: 19.2/23.5/28.2 East - Diseqc motorized flatdish antenna
Software : HomeBuild OpenPLi Develop and Scarthgap builds, local cards driven by OsCam
Press the button on the buttom right of this message
Have you tried our wiki yet? Many answers can be found in our OpenPLi wiki
Re: Skin: all colour buttons in one widget #3
Re: Skin: all colour buttons in one widget #4
Posted 30 October 2023 - 14:51
@Taapat
1. If you mean drawing colored text and no image - yes it support that.
2. Yes it auto scale to the space given by the widget. But here more or less it plays with the positions of the button made them fit to the width of the buttons widget. Currently scaling of the pixmap is not supported.
3. No. That is not yet supported. But it measures the text width and make space so whole text to be visible.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #5
Re: Skin: all colour buttons in one widget #6
Posted 30 October 2023 - 15:22
Edited by Taapat, 30 October 2023 - 15:22.
Re: Skin: all colour buttons in one widget #7
Posted 30 October 2023 - 15:33
1. Yes that is supported.
2. Since you render just one widget for all buttons and they are actually drawn inside it there is only the space given by that widget rectangle. If the size is something like size="e-220,36" then the width is dynamic depending on the screen width. But anyway the space for the buttons is limited to the place defined by the widget.
3. Yes there can not be enough space for all the buttons. For example if screen is too small and translations too long it will not fit. So there are options that you can define for the widget. you can tell the widget to use fluid layout...In this case it will measure the width of the text and will draw the buttons accordingly. So you will end up with different distance between the buttons. But you can define layout to be fixed. In this case it measure minimum distance between the buttons as width // 4. Then it renders the labels and if it detect longer label than minimum distance it expand the distance to the next button so text to fit. If at the end there is no enough width so all things to fit it automatically switches to fluid layout.
Well if there is still no space for all buttons...we do nothing for now.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #8
Posted 30 October 2023 - 15:35
@Huevos of course I can use my widgets or python code in skin as I do now.
Edited by Taapat, 30 October 2023 - 15:37.
Re: Skin: all colour buttons in one widget #9
Posted 30 October 2023 - 15:41
Personally, I am skeptical about all component and widget updates in enigma.
If someone wants to use them, it means that the skin can only be used on a specific image starting from a specific version.Therefore, in my opinion, it is better to add such components in the skin, because not all users regularly update enigma, even if they update the skin.
That is true. But the basics can be added to the enigma so to allow someone to write its own widget of that type and then he can include that with his skin.
But anyway there needs a bit extensions in the enigma core so to allow/provide framework for that custom widgets.
Ofcource it will be nice if there is such components in enigma itself. So to be possible to be used by skinners out of the box.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #10
Posted 30 October 2023 - 15:43
A long time, years ago, we did create the templates to make it more easier. Later I added the auto hide button stuff... what is this next change?
Basically as the whole skin stuff in enigma2 is not a real standard and stuck on the python code and not flexible at all at this moment my personal meaning is not to adapt something at it when it has a big impact and gains a lot of additional work,
When the merge request is straight forward, has a low risk and add value to make skins really more simple... then I would like it very much
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Skin: all colour buttons in one widget #11
Posted 30 October 2023 - 15:45
Is this change meant here?
https://github.com/O...05537e1c1abe669
Looks like this is a patch for the 4 color buttons only?....
Edited by littlesat, 30 October 2023 - 15:47.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Skin: all colour buttons in one widget #12
Posted 30 October 2023 - 15:47
Re: Skin: all colour buttons in one widget #13
Posted 30 October 2023 - 15:48
Is this change meant here?
That is part of the changes. But yes that is the widget ColorButtonsSequence.py. It is made on top of already existing GUIAddon widgets (used for the Pager only till now).
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #14
Posted 30 October 2023 - 15:49
Can we also get a merge request for this?
https://github.com/O...8782c61d88446d4
I hate it that good ideas are taken from here, but when something additional is required we do not get a merge request.
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Skin: all colour buttons in one widget #15
Posted 30 October 2023 - 15:49
A long time, years ago, we did create the templates to make it more easier. Later I added the auto hide button stuff... what is this next change?
Basically as the whole skin stuff in enigma2 is not a real standard and stuck on the python code and not flexible at all at this moment my personal meaning is not to adapt something at it when it has a big impact and gains a lot of additional work,
When the merge request is straight forward, has a low risk and add value to make skins really more simple... then I would like it very much
The new functionality doesnt break current skins. So you can decide use it or not. So in my opinion the risk is very little.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #16
Posted 30 October 2023 - 15:50
And one more note.It would be good, if in the commit when new features are introduced, an example of how to use it in the skin was specified.We, who are now considering this opportunity, may have understood how to use it. And I'm not sure that I understand all offered options.But if someone looks at this code aftera year, he will definitely not understand how to use it.
Agreed. For this a manual have to be made.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #17
Posted 30 October 2023 - 15:53
ColorButtonsSequence.py.
Actually somehow it gives me a less good feeling as it is an exception for the color buttons only. And there is more shown here like menu, info, list etc... also sometimes as icons... And it is 'coded' in python and not in the skin. Or do I miss something here. Can you also add the small icons?
But it adds a new renderer and is a file a skin can use or not. So as far I can see it is safe to add...
WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W
Re: Skin: all colour buttons in one widget #18
Posted 30 October 2023 - 15:53
A quick example of skin definition of that widget is this
for pixmaps + text
<widget addon="ColorButtonsSequence" connection="key_red,key_green,key_yellow,key_blue" pixmaps="key_red:buttons/key_red.png,key_green:buttons/key_green.png,key_yellow:buttons/key_yellow.png,key_blue:buttons/key_blue.png" position="0,0" size="e,36" font="Regular;26" backgroundColor="background5" alignment="left" zPosition="10" spacingButtons="40" spacingPixmapText="10" />
For only text
<widget addon="ColorButtonsSequence" connection="key_red,key_green,key_yellow,key_blue" textColors="key_red:red,key_green:green,key_yellow:yellow,key_blue:blue" position="0,0" size="e,36" font="Regular;26" backgroundColor="background5" alignment="left" zPosition="10" spacingButtons="40" spacingPixmapText="10" />
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
Re: Skin: all colour buttons in one widget #19
Re: Skin: all colour buttons in one widget #20
Posted 30 October 2023 - 15:56
ColorButtonsSequence.py.
Actually somehow it gives me a less good feeling as it is an exception for the color buttons only. And there is more shown here like menu, info, list etc... also sometimes as icons... And it is 'coded' in python and not in the skin. Or do I miss something here. Can you also add the small icons?
But it adds a new renderer and is a file a skin can use or not. So as far I can see it is safe to add...
For the small buttons like menu, info, etc.. there is another widget more simple one. ButtonSequence.py. But the requirement is that buttons to be defined in the screen .py. Otherwise will not know which buttons to render and which are visible.
Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, 2xPulse4K, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & 2xTriax 78 (39E)
9 user(s) are reading this topic
0 members, 9 guests, 0 anonymous users