Jump to content


Photo

Skin: all colour buttons in one widget


  • Please log in to reply
55 replies to this topic

Re: Skin: all colour buttons in one widget #21 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 30 October 2023 - 15:57

It is just a new renderer in fact... so no objections from me.

 

And can it also add the (four) 'button' pictures?

 

Yes. look at examples here https://forums.openp...dpost&p=1576234


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 #22 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 30 October 2023 - 15:59

One issue I have with that is that currently it is for your skin... and adding python code for a special skin is something we should avoid. But the difficult thing here is that it also make other skins more easy in a way that it does not interfere with something as these renderers are stand alone... and it is intend to be used by other skins. So I think we should agree...


Edited by littlesat, 30 October 2023 - 16:01.

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 #23 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 30 October 2023 - 16:02

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.


Of course, there are some critical points that cannot be ignored.
For example, I cannot create a skin that uses svg and autoscale, if it is not supported by enigma. Thanks to Huevos, who has created way for it.
But many python components don't need this.

But I support adding new components in enigma even if I don't use it.
Of course, they should be such, that many skin developers can use it, not just one specific one.
And it would be good if their code was also well polished.



Re: Skin: all colour buttons in one widget #24 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 30 October 2023 - 16:02

It is started because of my skin. But yes it can be used by others as well. And in fact the main idea is to make it simpler and save space since when you have 4 buttons and one in the middle is not visible currently it leaves empty space. With that addons it will not.


Edited by DimitarCC, 30 October 2023 - 16:04.

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 #25 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 30 October 2023 - 16:03

OK

 


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"


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 #26 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 30 October 2023 - 16:07

Years and years ago on each screen you should add all the buttons and pngs... and it was static. So when a button had no functionality you can remove the text but not a png that belongs to it. That time I used what was available with simple tweaks in the skin code. This one is next level as it uses a special renderer for it. At that time I did not thought about this. And it totally does not interfere with the current code.

 


It is started because of my skin. But yes it can be used by others as well. And in fact the main idea is to save space since when you have 4 buttons and one in the middle is not visible currently it leaves empty space. With that addons it will not.


Edited by littlesat, 30 October 2023 - 16:09.

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 #27 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 30 October 2023 - 16:08

It is started because of my skin. But yes it can be used by others as well. And in fact the main idea is to make it simpler and save space since when you have 4 buttons and one in the middle is not visible currently it leaves empty space. With that addons it will not.

 

A very good idea  :thumbs-up: .
To be honest, I hadn't even paid attention to it and imagined that I could do without spaces between the buttons.
 
UPD
Here I am talking about dynamic text in buttons.
When at some point the in screen button is empty.

Edited by Taapat, 30 October 2023 - 16:11.


Re: Skin: all colour buttons in one widget #28 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 30 October 2023 - 16:10

But to adapt the standard skin I need help....


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 #29 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 30 October 2023 - 16:12

But to adapt the standard skin I need help....

 

No problem with that. If that is included into the code we will make a manual how to use that stuff and always a personal help can be provided.


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 #30 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 30 October 2023 - 16:15

 

Here I am talking about dynamic text in buttons.
When at some point the in screen button is empty.

 

 

The widget updates itself once the text in a button got changed. So for example if key_red text become empty string it will hide that button. And if the key_green text changes from "Add timer" to "Remove timer" for example it will rerender itself automatically.


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 #31 Huevos

  • PLi® Contributor
  • 4,706 posts

+167
Excellent

Posted 30 October 2023 - 21:09

 


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... :D

 

"And there is more shown here like menu, info, list etc"

 

OpenPLi is missing all the hooks in the Python code for Menu, Info, Help Text, etc buttons.

 

Example of the hooks: https://github.com/O...eBox.py#L37-L39

 

And here is the widget: https://github.com/O...s.xml#L116-L118

 

In our skins these buttons show automatically without adding them to individual screens.


Edited by Huevos, 30 October 2023 - 21:18.


Re: Skin: all colour buttons in one widget #32 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 31 October 2023 - 09:08

Sounds like it is time to better work together and combine resources instead of working next to each other. Maybe indeed we do not have these keys yet and it is statically in our skins. It would be nice to have the complete button ‘bar’ in one renderer. Also for the icons teletext, subtitles, hd/4K/sd etc in one renderer so they can be dynamically located.
But most times these buttons you will show without text �
This is a big merge request for openpli to add all the hooks.
But the teneighty stuff is something I really hate…. Which box at this moment cannot do 1080 anymore?

Edited by littlesat, 31 October 2023 - 09:20.

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 #33 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 31 October 2023 - 09:31

The keys are needed so that button bars to work at all.

Regarding combining the buttons in one complete bar...Hmm i dont think that is really possible because Color buttons can consists from pixmap and text in different configurations and other functional buttons are usually only pixmap.

Also skinner can want to have color buttons on left and other buttons on right. So in my opinion there must be separate widget for color buttons, other buttons and eventually for that service related icons.

 

 

 

But most times these buttons you will show without text �
 

 

Well if new addons are used if the text is empty then the button got hidden.

 

 

 

But the teneighty stuff is something I really hate…. Which box at this moment cannot do 1080 anymore?

 

i dont think now there is boxes that cant handle 1080 skins. So new skins have to be at least 1080 in my opinion.


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 #34 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 31 October 2023 - 09:55

Well if new addons are used if the text is empty then the button got hidden. -> then is should be a bool, not text. Or when the key is there show it and then arrange the code such a way when you do not want to show it then remove the key. Of course openvix/or-alliance made it so sounds like no way to return.
Left right can be driven in one renderer. The order of the buttons already simply define it.

Edited by littlesat, 31 October 2023 - 09:56.

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 #35 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 31 October 2023 - 09:57

Actually a nice discussion here!!!

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 #36 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 31 October 2023 - 10:18

Well if new addons are used if the text is empty then the button got hidden. -> then is should be a bool, not text. Or when the key is there show it and then arrange the code such a way when you do not want to show it then remove the key. Of course openvix/or-alliance made it so sounds like no way to return.
Left right can be driven in one renderer. The order of the buttons already simply define it.

Well currently for color buttons when the text is empty or key is missing then it is assumed the color button is not used. So at least for color buttons we have to deal with empty text like boolean false.

Generally alignment can be done per button in one renderer/widget, but the actual issue is that color buttons are much more complex to render than other buttons.

For color buttons you can have many options:

 

- only text

- pixmap and text

   - pixmap on the left of the text

   - pixmap on the right of the text

   - pixmap below the  text

   - pixmap above the text

   - pixmap under the text

- only pixmap

 

Also there is need of dynamic sizing and positioning for color buttons.

 

Other buttons just contain pixmaps generally and doesnt need such a complex logic.

 

So in my opinion if we want more clean and understandable code that must be in separate renderers/widgets.


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 #37 Huevos

  • PLi® Contributor
  • 4,706 posts

+167
Excellent

Posted 31 October 2023 - 15:19

Well if new addons are used if the text is empty then the button got hidden. -> then is should be a bool, not text. Or when the key is there show it and then arrange the code such a way when you do not want to show it then remove the key. Of course openvix/or-alliance made it so sounds like no way to return.
Left right can be driven in one renderer. The order of the buttons already simply define it.

Bool, no. The skinner decides if it is button or text. That is why StaticText is used.



Re: Skin: all colour buttons in one widget #38 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 31 October 2023 - 18:10

Good argument...


So in my opinion if we want more clean and understandable code that must be in separate renderers/widgets.


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 #39 DimitarCC

  • PLi® Contributor
  • 1,578 posts

+71
Good

Posted 7 November 2023 - 10:58

So here is the first pull proposal 

 

https://github.com/O...igma2/pull/3822

 

Check it out and comment if there is something. Thanks.


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 #40 littlesat

  • PLi® Core member
  • 57,255 posts

+702
Excellent

Posted 7 November 2023 - 18:18

Beside I currently prefer the below.... I think it looks good...

 

Plus we have two choices here

 

1. Put it standard in enigma2

2. Put it in a separate package and arrange that when the skin is installed this package is also loaded.

 

I suggest when this is added to the standard skin... and somebody helps it... we for sure can go for option 1.

- str = str + " " + self.separator + " " + part
+ str = "%s %s %s" % (str, self.separator, part )

Edited by littlesat, 7 November 2023 - 18:20.

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



6 user(s) are reading this topic

0 members, 6 guests, 0 anonymous users