TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

[Bug]: Dark Mode won't activate on Fedora 40

Open Takanu opened this issue 1 year ago • 9 comments

Checklist

  • [X] I am using an up-to-date version.
  • [X] I have read the documentation.
  • [X] I have searched existing issues.

TagStudio Version

Alpha 9.3.1

Operating System & Version

Fedora 40 Workstation (Linux)

Description

Dark Mode doesn't activate when the OS is in Dark Mode.

I tried finding various ways to "force enable" the dark mode through available QT options and environment variables that can be modified on Linux to no effect.

Expected Behavior

I expected either:

  • The app to recognize the OS theme mode and change itself to match
  • The app to offer manual Dark Mode / Light Mode controls

Steps to Reproduce

No steps required, opening the app as is provided in Fedora 40 Workstation creates the issue.

Logs

While the logs don't appear to provide anything useful on inspection ill post the opening log just in case:

[QT DRIVER] Config File not specified, defaulting to /home/takanu/.config/TagStudio/TagStudio.ini
qt.svg: Cannot open file './tagstudio/resources/pause.svg', because: No such file or directory
qt.svg: Cannot open file './tagstudio/resources/volume_muted.svg', because: No such file or directory
Calling NavForward with Content:False, Index:0, PageCount:0
[ENTRY PANEL] UPDATE WIDGETS ([])

Please let me know if there's anything else I can try.

Takanu avatar Jun 14 '24 00:06 Takanu

On kde neon it also does not use dark mode for some objects, Causeing a Unique look

image

ooTruffle avatar Aug 23 '24 04:08 ooTruffle

https://github.com/TagStudioDev/TagStudio/issues/287#issue-2352251057

@Takanu, you're using GNOME, right? This bug isn't uncommon for Qt applications running on GNOME 40+, especially if they don't use KDE Frameworks’ workarounds.

RokeJulianLockhart avatar Aug 25 '24 11:08 RokeJulianLockhart

#287 (comment)

@Takanu, you're using GNOME, right? This bug isn't uncommon for Qt applications running on GNOME 40+, especially if they don't use KDE Frameworks’ workarounds.

I am. Is there a workaround for this?

Takanu avatar Sep 22 '24 04:09 Takanu

https://github.com/TagStudioDev/TagStudio/issues/287#issuecomment-2365457325

@Takanu, I never located a satisfactory one. I had to switch to KDE Plasma to get both GTK and Qt applications themed properly. Even Dolphin was broken for me on GNOME 40, last I checked (about a year or two ago).

Perhaps you could file a bug with Adwaita, but considering how much GNOME appears to be focussing on GTK4 with Libadwaita, I'll be surprised if they even consider it to be a bug.

Though, considering https://github.com/TagStudioDev/TagStudio/issues/287#issuecomment-2306283097 – which I think I missed last time – it might actually be specific to this application. I'll try testing TagStudio again myself.

RokeJulianLockhart avatar Sep 22 '24 10:09 RokeJulianLockhart

@RokeJulianLockhart That's pretty unfortunate. I rarely use QT apps and it's hard to say which ones do or don't support Dark Mode.

Switching distro isn't an option for me as I quite like GNOME and the one I'm on but I'll keep that potential limitation in mind. It would be useful if this app at least let you set the theme manually like a lot of other apps do however.

Takanu avatar Sep 22 '24 14:09 Takanu

I rarely use QT apps and it's hard to say which ones do or don't support Dark Mode.

@Takanu, they should all. You'd be hard-pressed to locate any which deliberately override the Qt stylesheet. Maybe looking at some threads like https://forum.manjaro.org/t/qt-apps-not-dark-on-gnome/144292/2 would be of use.

(There's no movement equivalent to https://stopthemingmy.app/, and even those support dark themes anyway.)

Switching distro isn't an option for me as I quite like GNOME and the one I'm on but I'll keep that potential limitation in mind.

You shouldn't need to. Solely DE.

RokeJulianLockhart avatar Sep 22 '24 18:09 RokeJulianLockhart

https://github.com/TagStudioDev/TagStudio/issues/287#issuecomment-2366641350

@Takanu, https://github.com/TagStudioDev/TagStudio/releases/download/v9.4.1/tagstudio_linux_x86_64.tar.gz works for me on https://download.fedoraproject.org/pub/fedora/linux/releases/41/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-41-1.4.iso, so I would presume that the application is handling Qt stylesheets correctly:

Screenshot_20241107_234706

I'd ask whether there's anything you can do at https://discourse.gnome.org/new-topic.

Environment

  1. #!/usr/bin/env -S sh
    kinfo
    
  2. Operating System: Fedora Linux 41
    KDE Plasma Version: 6.2.2
    KDE Frameworks Version: 6.7.0
    Qt Version: 6.8.0
    Kernel Version: 6.11.6-300.fc41.x86_64 (64-bit)
    Graphics Platform: Wayland
    Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
    Memory: 30.4 GiB of RAM
    Graphics Processor: AMD Radeon RX 5700
    Manufacturer: ASRock
    Product Name: X670E Taichi
    

RokeJulianLockhart avatar Nov 07 '24 23:11 RokeJulianLockhart

@RokeJulianLockhart I appreciate the shoutout, ive tried that version and it doesn't work on my version, and I'm not willing to use KDE as it doesn't fit my needs.

My solution was to give up on using Linux for creative work and continue using Eagle on Windows : )

Takanu avatar Nov 09 '24 21:11 Takanu

In case it helps someone else: for me, the following steps worked on Fedora 42 (with Gnome) to launch TagStudio with a dark theme 🙂

  1. sudo dnf install gnome-themes-extra to install Adwaita-dark as a separate theme
  2. gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark' to enable Adwaita-dark
  3. Launch TagStudio with QT_QPA_PLATFORM=wayland and GTK_USE_PORTAL=1. With a .desktop file, it means changing Exec=... to Exec=env QT_QPA_PLATFORM=wayland GTK_USE_PORTAL=1 /your-path-to-exec/tagstudio
Image

v-ll-v avatar Oct 23 '25 15:10 v-ll-v