bk138 / gromit-mpx

Gromit-MPX is an on-screen annotation tool that works with any Unix desktop environment under X11 as well as Wayland.
GNU General Public License v2.0
975 stars 81 forks source link

Dark mode in the Introduction and About windows not working for DEs other than GNOME #169

Closed mmahmoudian closed 1 year ago

mmahmoudian commented 1 year ago

If you'd like to put out an incentive for implementing this feature, you can do so at https://issuehunt.io/r/bk138/gromit-mpx

First and foremost, thank you for this handy tool. It is a bonus that it is available as Flatpak.

Is your feature request related to a problem? Please describe. I tend to forget the keybindings and therefore I have to keep this window open 👇🏼 which in a desktop with a dark theme causes lots of distraction and eyestrain image

Describe the solution you'd like It would be nice if: there is a toggle button somewhere in the window to be used for toggling dark mode. It would be extra nice if it can remember the last state as well.

Describe alternatives you've considered Gromit does not have config, but if it had, this could go in the that file.

Additional context --Not Applicable--

bk138 commented 1 year ago

As Gromit-MPX uses GTK3, you can simply use a GTK theme switcher and select a dark theme. Does this solve your issue?

mmahmoudian commented 1 year ago

Well, I have appiled the theme to GTK and all software I have are respecting it regardless of being installed via official distro repo of Flatpak. For instance in the following image I have opened Meld, pamac, and Flatseal. All are GTK, the first two are installed from official Manjaro repo, and Flatseal is installed via Flatpak.

image

For some reason Gromit does not follow the theme. I wonder if it is a bug (e.g during packaging in Flatpak) or it is kinda hard-coded. Can it be that it uses some old GTK versions?

bk138 commented 1 year ago

Strange indeed. Did you install the flatpak or a repo package? Which version of Gromit-MPX?

mmahmoudian commented 1 year ago

I have installed via Flatpak. This screenshot is from another Manjaro KDE machine in which the same issue persists. On both machines I have the latest Gromit and latest runtimes from stable branch of Flathub, and in both I have set dark theme for GTK

image

Please let me know if there is anything you would need. I'll be more than willing to assist in resolving the issue. I can test possible solutions and Flatpak builds if needed.

bk138 commented 1 year ago

Thanks for your help offer - could you maybe try and install a repo package or build from source? I'd like to rule out the flatpak packaging...

bk138 commented 1 year ago

@mmahmoudian I did some testing myself and here's what I found out:

One hint: flatpak list | grep theme gives me Adwaita dark GTK theme org.gtk.Gtk3theme.Adwaita-dark 3.22 flathub system, amongst others, so this might not be installed for you?

Edit: also found https://www.linuxuprising.com/2018/05/how-to-get-flatpak-apps-to-use-correct.html

mmahmoudian commented 1 year ago

changed theme to "Adwaita-dark" via gnome-tweak-tool

Is your host machine Gnome? Because I'm on KDE (both machines) and I am using the "Breath-Dark" GTK theme that is shipped with my KDE (to have the same exact colors as I have with my Qt applications):

image

but I have already the following installed (not installed today, but installed image

Here is a bit more info:

❯  flatpak list --show-details | grep "theme"
Breeze GTK theme    Breeze GTK theme matching the KDE Breeze theme  org.gtk.Gtk3theme.Breeze    5.25.5  3.22    x86_64  flathub system  org.gtk.Gtk3theme.Breeze/x86_64/3.22    2b52c4d5913c    -   636.4 kB    system,runtime
Adwaita theme   Adwaita widget theme matching the GNOME adwaita theme   org.kde.KStyle.Adwaita      5.15-21.08  x86_64  flathub system  org.kde.KStyle.Adwaita/x86_64/5.15-21.08    811d090059b2    -   16.3 MB system,runtime

One thing to mention is that all other GTK-based software (flatpak or not) are correctly accepting the GTK theme. The only outlier is Gromit as far as I can tell.

could you maybe try and install a repo package or build from source?

Gromit-MPX is not offered in Arch official repos, but I will try compile it myself and report back

bk138 commented 1 year ago

Yes, I'm running GNOME.

Is there a Breath-Dark flatpak you might be able to install?

mmahmoudian commented 1 year ago

Is there a Breath-Dark flatpak you might be able to install?

No I checked the moment you shared that link:

❯  flatpak remote-ls flathub | grep "org.gtk.Gtk3theme" | grep -i "breath" | wc -l
0

P.s: I would suggest changing the title: s/KDE/none Gnome/ because every other non-GTK DE would logically have the same problem (I have not test it though)

bk138 commented 1 year ago

@mmahmoudian can you maybe try with another theme and/or desktop environment?

bk138 commented 1 year ago

Closing for now, please feel free to post new info once available.