cassidyjames / ephemeral

A private-by-default, always-incognito browser for elementary OS
https://cassidyjames.com
GNU General Public License v3.0
154 stars 22 forks source link

MainWindow: Support -dark themes #233

Closed cassidyjames closed 4 years ago

cassidyjames commented 4 years ago

Should work better with -dark forced themes, like on Ubuntu or GNOME (with Tweaks). Kinda a major hack.

TingPing commented 4 years ago

The assumption that both a light version exists and that version has a dark variant is surely not reliable.

cassidyjames commented 4 years ago

@TingPing yeah, but it is true for the stylesheets I've looked at so far. Considering -dark is not any spec at all and yet WebKit switches web content to be dark (instead of just listening to GTK's dark variant) means that there are already breaking assumptions all over, and if this works less-broken on Ubuntu and GNOME, I may ship it.

But it's a giant fucking mess and I'm really disappointed with platforms like Ubuntu pushing ahead with -dark versions, as well as the lack of any sort of consensus on the GTK side as well (and work actively looking to be going in the wrong direction). I'd prefer not to hardcode the elementary stylesheet, but I might just end up doing that and give up on pretending to support my app on GNOME or any other platform.

cassidyjames commented 4 years ago

I should note that the worst case is that it falls back to Adwaita, which I've tested against. So not the biggest deal. And if a GTK3 stylesheet doesn't ship a dark variant, I don't think this breaks in any way.

TingPing commented 4 years ago

WebKit listens to both the dark preference and the theme name. Anyway I agree on that part being an undocumented assumption. I'm just not sure the assumptions here make any more sense.

cassidyjames commented 4 years ago

This was intended to be a draft PR to just spike out the idea, anyway. #234 is an alternative, as discussed in #231.

TingPing commented 4 years ago

I'm more of a fan of #234 as it has no real edge case to fail into unexpected behavior, even if unlikely.

cassidyjames commented 4 years ago

@TingPing I am generally as well. If an OS ships a dark mode, the app will just fall in line and follow it. This probably more closely reflects what I'd do for an actually-supported dark mode as well.

cassidyjames commented 4 years ago

Closing in favor of #234