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

Dark mode bug in Linux #557

Closed
ExTBH opened this issue Oct 19, 2022 · 11 comments
Closed

Dark mode bug in Linux #557

ExTBH opened this issue Oct 19, 2022 · 11 comments

Comments

@ExTBH
Copy link

ExTBH commented Oct 19, 2022

Describe the bug
Dark mode not being enabled

To Reproduce
Steps to reproduce the behavior:

  1. open app and see white mode

Expected behavior
should set dark mode

Screenshots
If applicable, add screenshots to help explain your problem.

Version and platform:

  • OS: [ArcoLinux rolling]
  • Syncplay version and build type: [ Syncplay 1.6.9 AppImage]
  • Media player and version: [e.g. VLC 3.0.16 32-bit]

Additional context
I think its being caused bu this line

if theme.endswith('-dark'):

it detects dark mode by running this
['gsettings', 'get', 'org.gnome.desktop.interface', 'gtk-theme'],

which return theme name
so i tried running it

>> gsettings get org.gnome.desktop.interface gtk-theme
<< 'Arc-Dark'

It is failing because .endwith() is case sensitive, .upper() or .lower() should get called before it

i don't know how to run or build from source so i can't check it

@ExTBH
Copy link
Author

ExTBH commented Oct 20, 2022

i have set another theme Adwaita-dark and ran syncplay from source and changed the method to force dark mode and im still getting white, so i think its not the reason

@albertosottile
Copy link
Member

The theme name case issue is solved in Darkdetect v0.7.0, but at the moment Syncplay still bundles v0.5.2. Hence, this could be solved by upgrading the vendor copy of this dependency.

However, I am a little concerned about your last message. In your test system, could you install Darkdetect from PyPI (pip install darkdetect) and report here the output of python -m darkdetect) with various themes? Thank you.

@ExTBH
Copy link
Author

ExTBH commented Oct 24, 2022

i tried 1 light, 4 dark
output

(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Light
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$

Also im getting this, i dont think i saw it before while starting in a dark or light theme set

(venv) [natheer@arco syncplay]$ python3 syncplayClient.py
QApplication: invalid style override 'kvantum' passed, ignoring it.
	Available styles: Windows, Fusion
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.

Thing is when i was on Mint last month all was fine, it got broken on Arch

@albertosottile
Copy link
Member

i tried 1 light, 4 dark output

(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Light
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$ python3 -m darkdetect
Current theme: Dark
(venv) [natheer@arco syncplay]$

So, this does mean that the latest version of Darkdetect is working as expected on your system. Am I reading this right?

Also im getting this, i dont think i saw it before while starting in a dark or light theme set

These messages should not be related to the dark-light theme.

@ExTBH
Copy link
Author

ExTBH commented Oct 24, 2022

Yes latest Darkdetect is getting it right
but syncplay is still in light, im about to go sleep ill see if i have time to reinstall from source and update darkdetect manually and post my results

@ExTBH
Copy link
Author

ExTBH commented Oct 24, 2022

well that was fast, so herew what i did

  1. cloned syncplay in new venv
  2. cloned darkdetect source
  3. copied dark detect folder and pasted in inside syncplay/vendor

ran app and still getting light mode, started thinking this is just a me problem

@albertosottile
Copy link
Member

I take this issue as a note that we have to update our vendor copy of darkdetect before the next release. Nevertheless, I am not entirely sure of what is happening on your system, hope you can figure it out.

@ExTBH
Copy link
Author

ExTBH commented Oct 25, 2022

this can be closed then, i would suggest linking to darkdetect repo instead of saving the module and placing, will make syncplay in sync with it https://github.blog/2016-02-01-working-with-submodules/

@albertosottile
Copy link
Member

I'd prefer not to, the whole point of the vendor is to make sure we have our own fixed copy of darkdetect, as we do for other small dependencies. We could also use PyPI and pin the version, later down the road.

@albertosottile
Copy link
Member

The next beta of version 1.7.0 will include an updated copy of darkdetect.

@VVhitehead
Copy link

I found that qt6ct worked for me. Xorg & bspwm no DE. Setting Color scheme: darker under the first tab, Appearance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants