Closed Likivik closed 3 months ago
Hi, thanks for reporting the issue and providing such an in depth explanation of the problem with how to fix it, amazing!
Cohesions code started as a fork of another electron app (WhatsApp Desktop for Linux) and indeed the electron version is very outdated.
I will try to have a look as soon as possible.
Regards, Bruno Finger
On Thu, 16 May 2024, 6:56 pm Likivik, @.***> wrote:
TLDR: Upgrading Electron version will allow Cohesion to automatically adapt to system theme (dark/light) without having to reopen it.
How to reproduce:
- Be logged in, set "Settings"->"My Settings"->"Appearance" to "Use system setting"
- In system settings (KDE, Gnome, etc) switch from dark theme to light or vice versa.
Expected result: Cohesion switches with the system theme Reality: Cohesion remains unchanged. (If you close application completely and reopen it will indeed follow system settings)
How to fix: Upgrading the Electron version to 25.0.0 or higher
If I understand correctly, according to commits, current version of Electron in Cohesion is 21. Not sure how hard it is to upgrade Electron.
Relevant Links:
- Explanation of the issue a bit over my head, from Obsidian formus https://forum.obsidian.md/t/color-scheme-adapt-to-system-not-working-on-linux-fedora-gnome/38743/15
- they indeed have it fixed now
- Chromium bug report 1 https://issues.chromium.org/issues/40850336
- Fix confirmation https://www.google.com/url?q=https://bugs.chromium.org/p/chromium/issues/detail?id%3D998903%23c134&sa=D&source=buganizer&usg=AOvVaw3QUTyBq1gKSMBu2pUbOw0S
- Electron version 25.0.0 with chrome 144 https://www.electronjs.org/blog/electron-25-0
Example Kde commands to switch themes from terminal: Dark
lookandfeeltool -platform offscreen --apply org.kde.breezedark.desktop dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze-dark-gtk"
Light
lookandfeeltool -platform offscreen --apply org.kde.breeze.desktop dbus-send --session --dest=org.kde.GtkConfig --type=method_call /GtkConfig org.kde.GtkConfig.setGtkTheme "string:Breeze"
— Reply to this email directly, view it on GitHub https://github.com/brunofin/cohesion/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5T7NK6VQD4LBS4U5BTLO3ZCTQMTAVCNFSM6AAAAABH2TJ7DGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDAOJQGE3DQMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
TLDR: Upgrading Electron version will allow Cohesion to automatically adapt to system theme (dark/light) without having to reopen it.
How to reproduce: 1) Be logged in, set "Settings"->"My Settings"->"Appearance" to "Use system setting" 2) In system settings (KDE, Gnome, etc) switch from dark theme to light or vice versa.
Expected result: Cohesion switches with the system theme Reality: Cohesion remains unchanged. (If you close application completely and reopen it will indeed follow system settings)
How to fix: Upgrading the Electron version to 25.0.0 or higher
If I understand correctly, according to commits, current version of Electron in Cohesion is 21. Not sure how hard it is to upgrade Electron.
Relevant Links:
Example Kde commands to switch themes from terminal: Dark
Light
https://github.com/brunofin/cohesion/assets/11075952/8c7adeb1-08bb-4898-8df9-c2d20be8f8e9