Button() and Label(), PLi opinion.
Re: Button() and Label(), PLi opinion. #241
Re: Button() and Label(), PLi opinion. #242
Re: Button() and Label(), PLi opinion. #243
Posted 29 January 2018 - 01:03
TBH, I think this solution is the best and clearest, even if it does use a second variable where necessary.
https://github.com/H....py#L1057-L1061
Re: Button() and Label(), PLi opinion. #244
Re: Button() and Label(), PLi opinion. #245
Posted 29 January 2018 - 09:29
Solo4K (with updates, feeds and plugins?). Or OS Mega.
osmega is ready (develop branch): http://www.mediafire...-osmega_usb.zip
No feed sorry ...
Open Vision sources: https://github.com/OpenVisionE2
Re: Button() and Label(), PLi opinion. #246
Re: Button() and Label(), PLi opinion. #247
Posted 30 January 2018 - 14:20
I converted "TimerEntry" buttons to the new style. Does it look ok?
https://github.com/O...igma2/pull/1236
Re: Button() and Label(), PLi opinion. #248
Posted 30 January 2018 - 14:45
The "SelectSatsEntryScreen" class (Satconfig.py) buttons should be changed. Should I use Label() or StaticText() for those?
self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Save")) self["key_yellow"] = Button(_("Sort by")) sself["key_blue"] = Button(_("Select all"))
Re: Button() and Label(), PLi opinion. #249
Re: Button() and Label(), PLi opinion. #250
Posted 30 January 2018 - 19:37
Well, isn't that a nice feature to have? Why we wouldn't always want that?
I mean, we should give the skin developer the possibility to auto-hide the button png if he likes. If he doesn't he can use a separate <ePixmap> or <eLabel> to always have the colored placeholder displayed.
Re: Button() and Label(), PLi opinion. #251
Posted 30 January 2018 - 23:04
Well, isn't that a nice feature to have? Why we wouldn't always want that?
I mean, we should give the skin developer the possibility to auto-hide the button png if he likes. If he doesn't he can use a separate <ePixmap> or <eLabel> to always have the colored placeholder displayed.
You've always been able to hide/show the PNG. Nothing new about this.
Re: Button() and Label(), PLi opinion. #252
Re: Button() and Label(), PLi opinion. #253
Re: Button() and Label(), PLi opinion. #254
Posted 31 January 2018 - 10:22
You ask me? This is what you wrote..
If you want the png to disappear when the button text is empty you need StaticText(), i.e.
self["key_blue"] = StaticText(_("Select all"))But don't forget changing from Button() to StaticText() will break every skin that does not have auto buttons.
You wrote that with StaticText(), the png can disappear (I suppose automatically) when there is no text. Can Label() do the same?
Just to be clear, can you explain what is the difference between Label() and StaticText() please?
Re: Button() and Label(), PLi opinion. #255
Re: Button() and Label(), PLi opinion. #256
Re: Button() and Label(), PLi opinion. #257
Posted 31 January 2018 - 12:39
Can this feature be added to Label() as well then?
In addition, if instead of a png I have a colored "eLabel" that I want to show or hide automatically with the button text, how can I do it? Can this be done with Label() or StaticText() is the only way?
No. You need to read back through the thread. It contains all the details.
Also if someone didn't try to convert label/button to have some of the function of StaticText (5 years ago) we wouldn't be in this mess now.
Edited by Huevos, 31 January 2018 - 12:42.
Re: Button() and Label(), PLi opinion. #258
Re: Button() and Label(), PLi opinion. #259
Re: Button() and Label(), PLi opinion. #260
Posted 31 January 2018 - 13:02
Actually all buttons could be replaced by staticText only.... but the pain is here that it will 'kill' all skins completely at once...
I understand this, but in order to clear the mess and make some progress, you have to make some sacrifices. By using mixed Label() and StaticText() for buttons, you just forbid skin authors to make pngs auto-hide, because some screens will auto-hide the png and some will not.
If you convert all buttons to the same style (StaticText), the skin authors will have to make one button template and add it to their screens. The same template to all screens. Not so much thinking for them.
My 2 cents.
21 user(s) are reading this topic
0 members, 21 guests, 0 anonymous users