Dark mode applied live, but not on app startup or when exiting preferences dialog

Bug #2076474 reported by Jeff Fortin Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Committed
Low
Maxime DOYEN

Bug Description

Follow-up to bug #2002177, as I'm now running Homebank 5.8.1 (running against GTK+ 3.24.43) on Fedora 40

https://www.gethomebank.org/ChangeLog mentions Freedesktop dark theme preference is now implemented in 5.8.x, and indeed it switches between light/dark when your system does the change "live", but I found two small bugs related to this:

* It only does it live; if you restart the app, it resets to light mode even if your desktop environment was already in dark mode on Homebank's startup

* If you switch to dark mode while Homebank is running, it switches to dark mode, but if you open the Preferences dialog and immediately click the Cancel button, with the "Interface > Dark theme" switch left unchecked (and unchanged), it reverts back to light mode.

Shouldn't that "Dark theme" checkbox item in the preferences dialog's "Interface" panel be deprecated? (or otherwise replaced by a combobox choice between "System (auto)", "Always light" and "Always dark", if you still want to offer a choice)?

Revision history for this message
Maxime DOYEN (mdoyen) wrote (last edit ):

On GNU/Linux system the value is red and applied.
Do you have any log message if you run from a terminal ?

The dark theme checkbox could be only visible/used for Non GNU/Linux system users, yes until I code a light/dark detection as well.

Changed in homebank:
status: New → Incomplete
Revision history for this message
Jeff Fortin Tam (kiddo) wrote :

> Do you have any log message if you run from a terminal ?

Nothing gets printed to the terminal other than this seemingly unrelated/harmless Gdk-Message:

> Window 0x55fd2d1146f0 is a temporary window without parent, application will not be able to position it on screen.

There is no message happening in the terminal when I do the live system switching either.

I checked with `--help` and did not see a `--debug` option or something similar, so I presume there is none.

It's strange that it works only during the OS' live switch, but not on startup and not when you close the prefs dialog…

Changed in homebank:
status: Incomplete → New
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Will try with a VM

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

installed fedora 40
compiled HB from source
found problem

the old gtk override setting override the Freedesktop...
it misses a #ifdef WIN_OS

Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Low
milestone: none → 5.8.3
status: New → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote (last edit ):

I finally opted for this fix:
- when colorscheme is DEFAULT (let app decide) : this will be implicit default for non Unix system also
  > the homebank checkbox is taken into account

- when colorscheme is PREFER_DARK/PREFER_LIGHT
  > we apply dark or light accordingly

Fedora do not propose PREFER_LIGHT, just DEFAULT they consider PREFER_LIGHT

Changed in homebank:
status: In Progress → Fix Committed
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.