Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problem with Flatpak GTK theme #694

Open
1 task done
kamilp opened this issue Feb 5, 2025 · 2 comments
Open
1 task done

[BUG] Problem with Flatpak GTK theme #694

kamilp opened this issue Feb 5, 2025 · 2 comments
Assignees
Labels
bug Something isn't working to be confirmed Issue is currently under review and has not been released

Comments

@kamilp
Copy link

kamilp commented Feb 5, 2025

Describe the bug

Whenever I run one of the com.ml4w apps via Flatpak - for example, by clicking the green "Welcome" icon on the right end of Waybar, I get weirdly themed result:

Image

same thing happens when executed from terminal, for instance for the settings app:

flatpak run com.ml4w.settings

results in:

Image

but when I run the settings app by clicking the "settings" button in the sidebar app -- theming is fine:

Image

Steps to reproduce

  1. run "flatpak run com.ml4w.settings" from terminal - theming is wrong (for me at least)
  2. click the green "welcome" icon on the right end of the Waybar -- the sidebar app will run.
  3. click the "settings" button
  4. Now the Settings app should be properly themed.

Expected behavior

Coherent GTK theming for all the com.ml4w apps.

Screenshots

No response

Distribution

Arch Linux

If Other, specify

No response

Additional context

Hyprland 0.47.2 built from branch at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff (version: bump to 0.47.2).
Date: Sun Feb 2 00:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
aquamarine 0.7.2
hyprlang 0.6.0
hyprutils 0.5.0
hyprcursor 0.1.11
hyprgraphics 0.1.1

no flags were set

System Information:
System name: Linux
Node name: archlinux-desktop
Release: 6.13.1-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Sun, 02 Feb 2025 01:02:29 +0000

GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD103 [GeForce RTX 4080] [10de:2704] (rev a1) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module 570.86.16 Fri Jan 24 21:25:51 UTC 2025

os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

plugins:


ml4w-hyprland-git
Version : 2.9.7.4.r77.g30562cb-1


My ~/.config/gtk-3.0/settings.ini:

[Settings]
gtk-theme-name=Adwaita
gtk-icon-theme-name=Papirus
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Bibata-Modern-Ice
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=1

~/.config/gtk-4.0/settings.ini

[Settings]
gtk-application-prefer-dark-theme=true

No overrides for flatpak, both outputs for these commands are empty:
flatpak override --show --user
flatpak override --show

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kamilp kamilp added the bug Something isn't working label Feb 5, 2025
@mylinuxforwork
Copy link
Owner

@kamilp Thanks for testing. Never had this before. Don't know how to test it on my side. Can you try nwg-look and maybe set another theme?

@mylinuxforwork mylinuxforwork added the to be confirmed Issue is currently under review and has not been released label Feb 5, 2025
@kamilp
Copy link
Author

kamilp commented Feb 5, 2025

Thank you for quick reply, and your fantastic work on the project!

Sadly, no matter what I try in nwg-look, it doesn't seem to have any impact on theming the flatpak apps.

Weirdly enough, when I click through the themes in the "widgets" tab of nwg-look, the preview in right pane doesn't even update. Perhaps I have something seriously wrong with GTK setup altogether... Perhaps I'm missing some crucial setting somewhere, or a package.

I'm wondering if it's not about the xdg-desktop-portal-gtk, 'cause initially, the com.ml4w.settings app appeared in the light theme for me (even though I have prefer-dark GTK setting on). Also, I was getting the Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop error when running the app from terminal. Only when tried some solutions from this reddit thread the error went away and the settings app appearad in the dark theme. Perhaps you have a custom ~/.config/xdg-desktop-portal/portals.conf file with some important setting?

In any case, thank you for looking into this. I understand you might not be able to reproduce the problem, but perhaps someone somewhere with the same problem will stumble upon this thread and will shed some light on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to be confirmed Issue is currently under review and has not been released
Projects
None yet
Development

No branches or pull requests

2 participants