Closed egla89 closed 5 years ago
Uh, well, I suck at working with graphics (aside from minor edits), so feel free to create a higher res base image and i'd gladly (try to) adapt it to the ~30 icons used. The current ICO files are in the resources folder of the source code.
Isn't it easier to make an icon class which renders the icons dynamically? that way you could use png's or something as a base and just render the needed images on top of each other as needed and you wouldn't need 30 icons
It probably is easier, but as you may already know I took over the majority of the code with forking it from someone else and my programming skills are rather limited. So major changes to the code mean quite a lot of reading for me, and I don't have that much spare time. A little help or pointers how to approach a better implementation are always welcome ;)
I havent programmed C# in over 7 years, but when I have some free time I will try to look at your project to introduce some features.
It might be a few months though since I do not have alot of time for hobby projects.
So... I had a bit of time the last days and experimented if it was possible to overlay/combine partial ICOs into the final icon. And of course it didn't work. Or, to be precise, overlaying ICOs should work, but the way the systray icon was implemented (via Hardcodet.NotifyIcon.Wpf) needs the path to an (embedded) ICO file, I can't just give it the generated icon/bitmap data... Or, in other words, using dynamically generated icons instead of the ~30 embedded icons would require a complete rewrite of the systray icon implementation...
Anyway, i'm still testing around with new, higher res icons. The ones currently used have the smallest possible resolution (16x16px), my tries with new icons (256x256 and 48x48) looked... rather bad on my screens because windows apparently handles downscaling badly. I can't test in 4k, only have a 1080p and 1440p screen available. I'll do another test with an ICO that contains multiple resolutions, but if that works it will be quite some work to create all those ICOs...
I have a 4K screen. Can I test the build with the new icons?
Make that singular, "new icon" for now. For testing I just replaced the default "no controller found" icon with different test ICOs to see if/how windows selects them. If you want I can upload that test version, but as I said, currently it only has a multi-resolution icon for the default state with no detected controller.
Yeah, upload it, lets see how it gets handled by the system at this resolution.
Here you go, I uploaded the test release: https://github.com/NiyaShy/XB1ControllerBatteryIndicator/releases
Looks WAAAAY better!
The old one...
...an the new one...
Thanks for the feedback, really looks a lot better ;) Guess it's time to puzzle together a LOT of new icons then... But I'll ditch the 32px in-between step since it scales and looks pretty bad on 1080 and 1440 screens.
I have a crazy idea! To draw the icons in the tray programmatically, using WPF, without the usage of ico files. The main benefit is to use vector image and let WPF scale it for the tray. Unfortunately, I am not sure that it is possible :( I need to try it and then I'll write about the results.
Be my guest to try. As I said earlier in the discussion, the current implementation via Hardcodet.NotifyIcon.Wpf relies on ICO files, and my C# skills aren't remotely good enough to change that. A vector-based system that allows overlaying/combining parts into the final image would be fantastic and save a lot of time for creating individual ICOs. But then again, I already started with creating "templates" and just need to puzzle them together, so it's not that urgent.
@NiyaShy , thank you for info. Unfortunately, my idea cannot be implemented because Hardcodet.NotifyIcon.Wpf can use only ico files.
Just uploaded v1.3.0, it now includes a full set of multi-resolution icons that should look a lot better on 4k screens.
Would be nice if there was a high res version of the icon available for 4K monitors