-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small redraw of the list rounded corners when changing items in the list #23
Comments
Unfortunately this behaviour cannot be remedied with the current implementation. Currently this is acheived with masking the default menu items, which reloads everytime you scroll to a new item. This can be fixed with future changes, Rockbox has a feature to draw more custom menus, however it is immature and hasn't been worked on in over 10 years. In order to use this in adwaitapod I would need it to work with features like changing the user selected menu item colour, user selected font colour etc. I have plans for how support for these can be added, but my C skills are dull so it's going to take time. But long story short: not fixable right now, but hopefully in a future update! |
It seems that you were able to fix the redraw issue in the Themify 2 current work, I'm currently reading your commits and code but could not figure out yet how you handled it, from what I can guess it seems that you're using a bitmap in a moving viewport but I'm not 100% sure. If you have some small hints on how you did that I could try to do a small PR to fix this issue for the Adwaitapod theme :) Thanks for all the awesome work ! |
Hey! Thanks for following up here, actually a good time to update what would be holding this back. Skinned menus work by letting themes create a viewport that represents a single menu entry, and then tiles it to fill the menu viewport. There are tags to change the visuals if the item is currently selected, as well as other things. It's very rarely been used in themes, and not much beyond tech demos, hence there are many bugs which can make the process time consuming. The big issue is still the menu selection colour. It hasn't been make accessible via theme tags, which adwaitapod would absolutely need. Themify can get away without it because the theme is built around the foreground and background colours which are available via theme tags. To use this properly in adwaitapod, we would need 4 new tags which expose settings like the line selector colours for primary, secondary and text colours as well as the line separator colour as a tag in the theme engine which sets the foreground colour of a viewport to that colour. I more or less know how and where to implement this, but have basically no time and likely wont for a while unfortunately. But this will definitely come. Themify's menu engine is super powerful, and it will allow adwaitapod to do so much more in the future! (also as a side note, Themify doesn't actually use bitmaps but technically uses vector graphics for the rounded corners via the font system! Hence why it's pretty difficult to understand. Sorry about that haha) |
Well that was a lot of useful information, I actually saw the 'skinned menu' code indeed but wasn't aware you were actually using it in Themify. I'll continue to read code and understand things and see if I can actually help with something. |
Thank you! If you're proficient in reading C and would be interested in helping to add the neccesary features, I can provide all the information I've gathered thus far. Either way, feel free to ask any questions that can help! |
I'm more of a web/PHP developer myself :D |
Sharing the notes here is a great idea! My current route for implementing these features is to build upon the existing colour display code. In skin_parser.c at line 749 there is an if statement for the foreground colour tag where I think the code for these features should go. Using them as foreground colours makes the most sense allowing for 1-bit bitmaps, %dr rectangles and fonts to be used to draw the line selectors and dividers. I can also see the %Vs tag needing a new mode to allow viewports to be drawing the selection background and foreground (though not entirely neccesary) For the most part, it's not the most difficult task since the code to do this mostly exists or can be riffed from other parts. Just with adding anything new to the theme engine, debugging can take time and effort, as well as making sure features are properly documented and compliant with the programming style of the Rockbox code base. |
When scrolling items in the list the light gray selection is displayed as a non-rounded rectangle for a few ms before being redraw with the correct border-radius corners. Can it be fixed to be drawn directly as it should ?
The text was updated successfully, but these errors were encountered: