Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you theme apps without testing there is always the change that you break apps with complex or custom widgets. It is kind of sad seeing your app looking and behaving like crap due to some random them that the distro apply to all GTK-based apps without doing any testing or validation.


To me, this is a big argument as to why devs should be making heavy use of parameterized values their UIs, as opposed to hardcoding things. An app making as much use of parameterized values as possible will not only remain decent looking and usable under most themes (except for themes that are badly built — nothing can help there), but also play much more nicely with accessibility settings like font size, font weight, colorblindness modes, etc.

I will caveat this by saying I haven’t worked with GTK and don’t know how well-tooled it is in this regard. If GTK doesn’t offer any/many parameterized values, then that’s on GTK, not app devs. They’re pretty well supported in macOS/AppKit, iOS/UIKit, and Android/Compose though and should be a cornerstone of any modern UI framework.


That’s not a silver bullet.

You can have a logo for your app that is coloured green. Then the user is using an all-green theme that happens to match the shade of your image and the logo is basically invisible.

That’s just easiest counter-example I could come up with.


Totally true that it's not possible to catch all edge cases, but I don't think it's a strong enough reason to rule out user theming/customization altogether, plus as mentioned parameterization should be done anyway for good accessibility.


Which is why the approach iced/libcosmic is taking is great. It's mostly just changing colors and some border radius. As a user, I can make my GUI match my text editor/terminal and I'm happy. It's not like the old days of GTK2.x with pixbuf themes making everything crazy (although that was fun). After all this is desktop linux, people tend to gravitate to it because they want to be able to tweak things.

I mean even OSX has had accent colors for years, ffs.


It's not clear to me what are the real benefits though.

> It's mostly just changing colors and some border radius.

This can still break apps though, as it's impossible to test all possible color themes to see if the app has enough contrast with all of them.

> After all this is desktop linux, people tend to gravitate to it because they want to be able to tweak things.

This is what I particularly don't get though. Compared to GTK this seems to be more limited. Granted, GTK does not officially support custom style sheets and lately they have become harder to set, but the option is there and people have been making themes that completly change how some widgets look like. All of that seems fundamentally impossible here.

> I mean even OSX has had accent colors for years, ffs.

There is a xdg portal to set accent colors (from a limited testable set of colors) since some months. I wonder if libcosmic supports that or if you're forced to manually set a theme.


You can still do whatever you want in ~/.config/gtk-4.0/gtk.css, including importing other stylesheets. This also works for libadwaita apps. What the Gnome devs and the https://stopthemingmy.app/ people don't want is for Ubuntu or Manjaro to ship a themed/patched stylesheet in the system that breaks their apps, and they have gotten their way.


KDE and KFrameworks already provides such an ability. Either way, great to see more options!


Isn't that what you can do in Gnome/GTK4/Adwaita as well?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: