Which widget gets tl or tr first ? #4158
Replies: 1 comment
-
Posted at 2022-01-12 by myownself It seems to be the sortorder attribute of the widget: espruino/Espruino@8ae6fe2 But I don't know where that comes from because I can't see it on any widget in the BangleApps repository. Posted at 2022-01-13 by HughB Maybe it's species in apps.json. Posted at 2022-01-13 by myownself I wondered. It is specified for some entries there, but didn't see it for the widgets you screenshot so I don't know what the fallback is in that case. But I also thought that might serve another purpose. Was just guessing though. Posted at 2022-01-13 by @gfwilliams If there's no sortorder specified (which I implemented I believe but isn't used) the order is just the order the files happened to be listed in storage - so if you need to specify something best to just stick a sortorder in apps.json and I think that should work its way into the app info file. Posted at 2022-01-13 by rigrig
I think you want to put it in the widget code instead: the So something like
Posted at 2022-01-13 by HughB I've done it through apps.json as that makes it more visible and standard. PR issued. Posted at 2022-01-15 by rigrig Did that actually work? Because as far as I can tell, (Also, editing the code to change widget order seems suboptimal, so I made a widget editor) Posted at 2022-01-18 by @gfwilliams
That's a good point! I may well have been wrong :) Posted at 2022-01-19 by HughB
No it didn't work. but it was not immediately obvious as it is hard to test. Lots of installing and uninstalling etc.
Just tried it out. Good job.
I would agree with the exception that certain widgets (eg lock widget) should have good defaults to start with. Posted at 2022-02-19 by HughB Apologies for revisiting, this. I just noticed that when I installed the gps widget that it got first place in the tr corner and usurpped the battery theme widget. for the lato pedometer widget I have, and this ensure its always the tl most widget.
for the batthery themed widget I have:
this doe not seem to work and force the battery widget to always be in the top righmost corner. What value of sortorder should I use ? Posted at 2022-02-21 by @gfwilliams The actual code for loading widgets is:
So it should work just to have what you're doing... You could check the Posted at 2022-02-21 by HughB Should I be putting positive values for sortorder if I want the battery widget to always be displayed on the extreme rhs? Posted at 2022-02-22 by @gfwilliams No... I think negative makes it go near the start of the element - so leftmost for Posted at 2022-02-22 by Alessandro I forced a sort order of "10" throught Widget Editor to keep the battery widget top-right. Posted at 2022-02-22 by @gfwilliams @hughb could it be that you have the Widget Editor installed so it's overwriting the positions you are setting? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-12 by HughB
I am wondering what controls the order in which widgets that occupy the same area are loaded / displayed. I like the lock widget to display in the extreme top left hand corner.
Try as I might I cant get this to happen. I have tried deleting all widgets and installing them in different orders but the lock widget is displaying to the right of the 'Lato Pedometer' widget.
The 2 widgets in the screenshot are
Short of a factory reset is there something else I can try ?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions