Dark theme?
Dave Higton (1515) 3526 posts |
It seems to me that there are two ways to implement themes: 1) Add to the API a means for an app to ascertain what theme is in force, and a Wimp message to signal a change to the theme. This means that all apps will have to change in order to conform, and also means that abandonware will never conform. 2) Change everything necessary behind the scenes so that apps just work with no change. This means that some apps will undoubtedly not respond properly to different themes. Neither is going to work very well because of those limitations. My phone and my car have light and dark themes. If they didn’t, I don’t think I would notice or care. Haven’t we got other, much more important, priorities? |
Cameron Cawley (3514) 157 posts |
I’d noticed that, but the thing I was trying to point out is that the OS has support for selecting between alpha and non-alpha sprites built-in, while NetSurf uses a custom script to detect this.
The bit you’re quoting was specifically talking about the issue Paolo mentioned about how icons for recent icons tend to blend with a grey background but look bad with a different colour, which can be seen in the screenshots. That said, quite a few applications have multiple icon sets to match the system icons like directories or files (and sometimes to match the standard colour depth for the icon), but they’re typically selected based on the OS version, so the wrong one is selected when using RISC OS 5 with the Morris4 or Ursula themes.
The website for ArtWorks states that “Illustrations created in ArtWorks 2 can be exported with anti-aliasing and transparency information as alpha masked Sprite or PNG files. This finally makes it easy to create bitmaps that blend perfectly into any background, which is ideal for web and icon design.”, so for icons created using it, it should just be a case of exporting them again. Converting from PNG files on other platforms is a bit more difficult, but I’m hoping to sort out a solution for that.
It does to some degree – it’s one of the recent additions from the Paint bounty. |
Rick Murray (539) 13840 posts |
This seems to be what Android does. Some apps work, some… really don’t. But it’s not a big deal as loads of apps do a dark theme independently of the OS (especially since it took Google’s expert programmers until something like Android 10 (!) to even support dark mode). Yeah, it’s a bit of a mess, but I guess screwing with Play Services to be even more intrusive was more important than getting the UI doing things people have been asking about since forever and a day.
So your car is, like, coloured during the day and it turns black at night? Cool. Not even Tesla has managed to pull off that one yet. ;)
I always do. It’s my personal zen moment. 1 Been like that my entire life, stupid white matter doesn’t like entering standby mode, instead it tries to think of everything at the same time. Which I guess would be okay if I had an idea that made me a few million euros, but alas, my mind is a great example of GIGO… |
Fred Graute (114) 645 posts |
I think Michael is referring to the work I did 15(!) years ago to allow the use of solid icons for window furniture. See ‘Themed Wimp’ Not much use anymore, it’s all been removed. |
Paolo Fabio Zaino (28) 1882 posts |
Thanks Fred, Sprow to the rescue and (for once that I did not check on ROOL gitlab lol!) there is documentation on this use-case, so I may be able to solve the issue. However, from a quick test with nightly build 5.29 (2023-08-11) RISC OS appears to be getting worst with theming the buttons… On 5.28 I managed to, at least, color theme the buttons, on 5.29 doesn’t work anymore and (obviously) there seems to be still no way to flatted those buttons… I am slowly starting to give up on RO 5 theming, it’s just random, now I need to figure out how to handle this new issue and add a new exception case to my Theme manager for 5.29 onwards… bah, I am tired, time to go to sleep. |
David J. Ruck (33) 1635 posts |
Change everything necessary behind the scenes so that apps just work with no change. A better example would be the DarkReader browser extension for both FireFox and Chrome which I use on all my machines (except RISC OS of course). It does an amazingly good job of making sites work with a dark background, and not just work but often look better. For those that don’t work out the box it has another 3 modes which can be tried, and turned off for certain sites if necessary. It would need this sort of level of configurability for desktop applications. |
Bryan Hogan (339) 592 posts |
WTF? |
André Timmermans (100) 655 posts |
Yes, and now we have 3 versions of EtherUsb, see https://www.riscository.com/2023/alternative-etherusb-module/ |
Rick Murray (539) 13840 posts |
And if you read through the story…
Can’t help but feel this is not the right way forward. |
Michael Drake (88) 336 posts |
Oh really? That’s a shame, I must have missed all that. What a mess. |
Steve Fryatt (216) 2105 posts |
I think the merge request is here, last updated a month ago. I wonder what the delay is. A few possibilities spring to mind…
I’m sure that there are more, too. As ever, it’s not an easy task to manage the codebase of a large Open Source project like an operating system. I’m sure that I remember members of ROOL noting in show talks that they would be happy to have more people on board to help with the task, so maybe those who are unhappy could offer to assist in a constructive way? |
Sprow (202) 1158 posts |
The window furniture icons for the Raspberry Theme use a(n apparently) crazy set of colours.
I can assure you they were designed in Paint. It’s really not difficult once you stop shaking your fist at the screen, just think calmly that the tool tables map colours in the underlying sprite to a custom palette (one for each of the 16 possible Wimp colours that would be used for the fill, eg. cream is colour 12, so applies table 12). The bit Paint can’t do is work out the minimal set of 256 colours from 16M which would cater for all the 16 Wimp colours, but that can be calculated with a bit of BASIC and a histogram. I think InterGIF might have an option to reduce a palette to its minimum occupancy too? The last step is then to disable the palette in Paint, since it’s now redundant information which is in the tool tables, at which point the colours go crazy to the naked eye. If that’s still head hurty there’s a test set which via a table overlays a number on the tools instead. This scheme allows any arbitrary colour change for any title bar (and the other tool widgets) with or without focus, otherwise the Wimp will tint the sprite for any grey pixels and leave the non-grey ones alone. |
Paolo Fabio Zaino (28) 1882 posts |
Indeed and so are my Themes.
True, and mines as well in some cases. Also Sprow, thanks for your help on the buttons colours issue as well, it’s now fixed and working well! Next I’ll need to figure out what’s up with the Pinboard (it seems to be forcing black Fonts), however this is a task for next weekend, other priorities on my plate today. |
Steve Pampling (1551) 8170 posts |
Traditional Pinboard presumably, rather than the new (not in the standard ROOL release) Pinboard2? Perhaps utilising the more modern version as a base would work better. |
Paolo Fabio Zaino (28) 1882 posts |
Tried both and in both cases fonts are black, so I’ll need to investigate this. Part of the problem is handling a theme for multiple versions of RISC OS, which, instead of establishing a standard for theming, had years of minor changes here and there, so it’s hard to figure out a “standardised” approach. BTW this is not a complain against who worked at these changes, just stating a fact, I understand people did what they thought was the best or easiest way to improve the situation at that given point in time. |
Rick Murray (539) 13840 posts |
? Surely people running the nightlies keep at least a previous known working build on their machine? If so, it’s a case of if you can get to the command line, copying the previous (like riscos.bak) as the current (like riscos.img) and then just rebooting? |
Rick Murray (539) 13840 posts |
Thank you for the explanation. Are the palettes used available anywhere?
Now that looks good.
Yes, I use Pinboard2. Much better handling of the images, and I like that it will extend the bottom of the image into the iconbar (looks nifty and correctly fits the screen).
Does the |
Paolo Fabio Zaino (28) 1882 posts |
Thanks, well slowly getting there :)
Could be, but will need to wait till next weekend, I have a few videos to edit now. Everything needs to move forward. The new Theme Manager is coming along well and this is only one of the new themes it’ll offer straight out of the box. There is the Clean white one, all old Richard Goodwin ones (with fixes, included Buffy!) all the original ROOL’s ones and there is an experimental one with rounded windows corners which I need to finish as well. So, hopefully there will be something for every taste. I am also working on a module for time-based backdrop slow changing like on modern macOS so same picture in the morning looks (well) morning time and, slowly, light of the pciture follows the time of the day. This will be released later on, needs more debugging and still few fixes. |
Steve Pampling (1551) 8170 posts |
That raised a wry smile. Rounded buttons too? |
Paolo Fabio Zaino (28) 1882 posts |
Nah, that would require the re-unification of the toolbox with the one from RO 4/6. But, in all honesty, rounded corners in RO 4 and 6 were a bit weird. I mean the “visual language” meaning of using rouded shapes, is to give the eye a more gentle (and so “approchable”) perception of an object (this is BTW why a lot of tech tools that surround us have roubded corners). It’s not secret Apple favored rounded shapes by many many years, because they give a perception of ease of use to a user (there are also plenty of study on the subject), also elegance in certain ways. But, the rouded corners of RO 4 and 6, wheren’t exactly that, it felt more “I want rounded buttons on traditional RISC OS theme”, maybe they needed to be more subtle. |
Paolo Fabio Zaino (28) 1882 posts |
Last night I had some time to add code to handle pinboard’s Fonts in the Theme Manager and now the last bit is fixed! :) The good news is by redefining Pinboard’s Fonts configuration doesn’t seems to have an impact on the user selected background. That’s a bonus, ’cause if someone wants to customise the theme even further they should be able to do so without weird behaviours on the next system boot. |
Rick Murray (539) 13840 posts |
Have you tested with Pinboard2? That allows the font to be changed, so will likely behave a little differently to the bog-standard pinboard. …here I am, in a dark living room, with a heavy-cloud sky, and no lights on, having my eyeballs melted by NetSurf’s bright white background. Kind of looking forward to this! A night mode would be a great addition to RISC OS. |
Kevin (224) 322 posts |
Looks good |
Rob Andrews (112) 164 posts |
More to the point when can we take it out to play. |
Paolo Fabio Zaino (28) 1882 posts |
Yes, picture above is on Pinboard 2.0 (I have not favorite team, so for me the work ROD is doing and ROOL are both very valuable and therefore I test my work on both and the old Acorn’s world).
Me too, after almost 40 years of coding non-stop, my eyes really hate white themes (or light gray). However, just. to be clear, a website that has white page will still look white. So, if you want a dark website, you need to make one or we need to make a plugin for NetSurf and Iris to fix that.
Thanks, well, what it needs next (beside me finishing testing the new Theme Manager and give it a Front End so people can actually select the Theme they want) is re-design the standard icons for it. Given that making the whole set of icons is the most boring job in the world (well for me), in absence (almost certainly) of volunteers, I had to start experimenting with creating a “Cybernetic RISC OS Community”, in other words I have started to create “AI” models that can help me to become as productive as a team of developers. Note: these are models I am creating, this is not using ChatGPT. The first one1 is being trained to identify the “important elements” in traditional RISC OS icons. Those patterns that people have become used to (they should be considered as a “language” that people understand and use to figure out what a button does). For instance what makes you recognise that an icon is about a file vs a folder. When the train is completed, that AI will generate a description of such patterns in a “declarative” language. The declarative language not only supports the definition of an object, but has a separate definition for the colours (which already support both Alpha channel and tradition Sprite’s transparent colour). I have also almost finished a “compiler” for the declarative language that, given a set of icons (which are a combination of objects and colour schemas) will “compile” it into a full icon set. This because I suck at graphics XD – The results are extremely promissing, last night it has completely automatically generated a small set of icons in grey scales and alpha channels without me havign to draw a single pixel. But it will take still time to complete the whole phases. It can also create sprites for games etc. The AI will generate multiple sets of objects in different styles, then the colour definitions are still manual, but they look something like this:
So that an object can use a colour name and that makes it easy to replace the actual colour at compile time. This is an example of object definition:
And obviously the base_folder_obj_body is defined as well and would be something like:
And finally this is how you’d create an icon that gives your the same message as the !Locate icon, using this declarative language:
The compiler has a full recoursive descendant parser which allow icons to be defined in all sorts of complex ways. For the declaration syntax (I am sure you’ve noticed it already), I have chosen YAML format. That makes it easy to highlight things on any IDE (for human corrections) and also very easy to implement the production process as a GitHub action (in other words, you’ll be able to submit your definition and get a full icons set produced for you). It also supports Jinja, so an icon production file can be made like this:
selected_objects_style (for example) can be “populated” at compile time using an ENV variable and so creating full automation procedures. The include supports also things like /objects/traditional_riscos4_structure_style/*.yaml And will include every YAML files in that path. Once this is done, the same iconset can be produced with different colours schemas or different objects styles, but still using the “visual language” we are used to. …and yes I am having fun XD 1 Please note: This is a combination of neural networks and expert systems techniques, so no you can’t chat with it :) |