file chooser dialog doesn't respect system theme

Bug #2013126 reported by Dennis Loose
132
This bug affects 21 people
Affects Status Importance Assigned to Milestone
libadwaita-1 (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Lunar
Fix Released
High
Marco Trevisan (Treviño)
xdg-desktop-portal-gnome (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

[ Impact ]

The file chooser dialog uses the default (light) style, even when the dark style is enabled.

[ Test case ]

Run:
  gdbus call --session --dest org.freedesktop.portal.Desktop \
    --object-path /org/freedesktop/portal/desktop \
    --method org.freedesktop.portal.OpenURI.OpenFile "" 0 {}

The dialog opened should respect the theme variant (dark/light) and the accent color.

Same is for all the open dialogs and selectors opened from snaps (i.e. browsers).

[ Regression potential ]

Color scheme or yaru accents are not applied to libadwaita applications (both confined or not)

ProblemType: BugDistroRelease: Ubuntu 23.04
Package: xdg-desktop-portal-gnome 44~beta-1ubuntu1
ProcVersionSignature: Ubuntu 6.2.0-18.18-generic 6.2.6
Uname: Linux 6.2.0-18-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 28 21:08:55 2023
InstallationDate: Installed on 2022-09-07 (202 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)SourcePackage: xdg-desktop-portal-gnome
UpgradeStatus: Upgraded to lunar on 2023-03-28 (0 days ago)

Revision history for this message
Dennis Loose (dloose) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdg-desktop-portal-gnome (Ubuntu):
status: New → Confirmed
Revision history for this message
Lepaffe Philippe (mistermagio) wrote :

Experimentation on another distro shipping GNOME 44 (a F38 Silverblue VM) suggests that this is not an upstream issue, at least I wasn't able to reproduce it.

Revision history for this message
Gregory Khvatsky (gregkh1996) wrote :

For flatpak, even forcing dark mode via envvar like this:

$ flatpak run --command=sh org.mozilla.firefox
[📦 org.mozilla.firefox ~]$ GTK_THEME=Adwaita:dark firefox

Does not help

Revision history for this message
Gregory Khvatsky (gregkh1996) wrote :

This happens due to this commit to libadwaita that inadvertently disables color scheme support: https://git.launchpad.net/ubuntu/+source/libadwaita-1/commit/?id=5dadba0afcf778a84aa82a7449ea1e395745b57e

Please find a patch for libadwaita attached that (on my machine) fixes this problem:

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Restore-Color-Scheme-Support.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libadwaita-1 (Ubuntu):
status: New → Confirmed
Revision history for this message
Batwam (batwam) wrote :

same issue here with Firefox (snap) and Google Chrome (deb)

Revision history for this message
Munch (graystripe) wrote :

The file save dialog has the same bug.

tags: added: rls-ll-incoming
Changed in libadwaita-1 (Ubuntu):
importance: Undecided → High
Changed in libadwaita-1 (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
tags: added: dt-1265
Revision history for this message
gutopardini (gutopardini) wrote :

I'm having this issue with all browsers

Revision history for this message
Gregory Khvatsky (gregkh1996) wrote (last edit ):

As a workaround, you can try adding

ADW_DEBUG_COLOR_SCHEME=prefer-dark

to

/etc/environment

This will force the theme to dark mode, but I'm not sure what other effects it will have.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libadwaita-1 - 1.3.3-1ubuntu1

---------------
libadwaita-1 (1.3.3-1ubuntu1) mantic; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * Merge with Debian. Remaining changes:
    - debian/patches: Support yaru accent colors using adwaita theming
  * debian/patches: refresh
  * debian/patches: Reuse GSettings implementation for yaru accents
    (LP: #2013126)

  [ Grigorii Khvatskii ]
  * debian/patches: Always init gsettings and legacy settings backends
    (LP: #2013126)

libadwaita-1 (1.3.3-1) experimental; urgency=medium

  * New upstream release (LP: #2023411)

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 09 Jun 2023 21:29:44 +0200

Changed in libadwaita-1 (Ubuntu):
status: Confirmed → Fix Released
Changed in xdg-desktop-portal-gnome (Ubuntu):
status: Confirmed → Won't Fix
no longer affects: libadwaita-1 (Ubuntu Jammy)
no longer affects: xdg-desktop-portal-gnome (Ubuntu Jammy)
no longer affects: xdg-desktop-portal-gnome (Ubuntu Lunar)
Changed in libadwaita-1 (Ubuntu Lunar):
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Simon Chopin (schopin) wrote :

Hi,

Marco, I'm a bit confused regarding the status of this bug in Lunar. You marked this as "Fix Committed", but I don't see any package in lunar-proposed for it?

Revision history for this message
Benjamin Drung (bdrung) wrote :

I unsubscribed ~ubuntu-sponsors for now. Marco Trevisan, are you taking care of backporting the fix to lunar?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Simon, Benjamin:

The fix is already in the ubuntu lunar proposed queue for some days so it's waiting for someone from the SRU team to approve it.

See https://launchpad.net/ubuntu/lunar/+queue?queue_state=1&queue_text=libadwaita-1 and https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Steve Langasek (vorlon) wrote :

This bug is missing the SRU template (test case, etc)

Changed in libadwaita-1 (Ubuntu Lunar):
status: Fix Committed → Incomplete
description: updated
Revision history for this message
Mike Adams (mikethebos) wrote :

My apologies, changed status on accident - should be Incomplete again.

Changed in libadwaita-1 (Ubuntu Lunar):
status: Incomplete → Fix Committed
status: Fix Committed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dennis, or anyone else affected,

Accepted libadwaita-1 into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libadwaita-1/1.3.3-0ubuntu0.23.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libadwaita-1 (Ubuntu Lunar):
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-lunar
Mike Adams (mikethebos)
tags: added: verification-done verification-done-lunar
removed: verification-needed verification-needed-lunar
Revision history for this message
Mike Adams (mikethebos) wrote :

I tested libadwaita-1 1.3.3-0ubuntu0.23.04.1 in lunar-proposed. Both open and save dialogs in Firefox snap are now themed correctly in light and dark modes.

Mike Adams (mikethebos)
tags: added: verification-needed
removed: verification-done
Revision history for this message
Graham Inggs (ginggs) wrote :

libadwaita-1 has been uploaded and verified, unsubscribing ubuntu-sponsors and adjusting tags accordingly.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Munch (graystripe) wrote :

Not only did it fix the theme issue with the file picker dialogue, but it also restored drag and drop functionality to Dolphin and re-enabled ctrl+click functionality to the file chooser.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libadwaita-1 - 1.3.3-0ubuntu0.23.04.1

---------------
libadwaita-1 (1.3.3-0ubuntu0.23.04.1) lunar; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * New upstream release (LP: #2023411):
    - tab: Add a default handler to extra-drag-value
    - Update Brazilian Portuguese translation
    - carousel: Fix scrolling to a recently inserted item
    - style-manager: Fix get_for_display annotation
    - doc: Drop --add-include-path
    - Update Slovak translation
  * debian/control: Update vcs references to ubuntu/lunar branch
  * debian/patches: Reuse GSettings implementation for yaru accents
    (LP: #2013126)

  [ Grigorii Khvatskii ]
  * debian/patches: Always init gsettings and legacy settings backends
    (LP: #2013126)

  [ Lukáš Tyrychtr ]
  * a11y: Fix AdwEntryRow accessibility, again (LP: #2015760)

 -- Marco Trevisan (Treviño) <email address hidden> Mon, 12 Jun 2023 14:27:11 +0200

Changed in libadwaita-1 (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for libadwaita-1 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Marcos Alano (mhalano) wrote :

I think this patch wasn't added in Mantic, so the problem seems to happen again. I opened an issue for that: https://bugs.launchpad.net/ubuntu/+bug/2034602

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.