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

__main__: Implement basic darkmode provisions #5526

Merged
merged 4 commits into from
Aug 6, 2021

Conversation

irgolic
Copy link
Member

@irgolic irgolic commented Jul 14, 2021

Description of changes
  • Sets 'darkMode' property in QApplication if 'dark' is specified in stylesheet. This can be easily queried globally elsewhere to color decisions
  • Sets default pyqtgraph colors from QPalette on startup

Also removed the pyqtgraph colors set on owpalette.py import (please don't call code like this :x)

This is the first step toward proper dark mode support. Most (if not all) visualizations hardcode their colors. These hardcoded colors need to be removed and delegated to global default color settings (as set in 8f92990).

Note, this only works on startup, if the OS changes its color scheme (as Mac can upon sunset/sunrise), it won't update accordingly. But it's a first step.

This was transplanted from #5287. That PR will change into setting new default colors.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #5526 (6f58628) into master (aa628bf) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5526   +/-   ##
=======================================
  Coverage   86.36%   86.36%           
=======================================
  Files         304      304           
  Lines       61665    61663    -2     
=======================================
+ Hits        53254    53255    +1     
+ Misses       8411     8408    -3     

@irgolic irgolic force-pushed the basic-darkmode branch 2 times, most recently from ebe1dcb to cea5591 Compare July 14, 2021 23:28
@PrimozGodec PrimozGodec merged commit c326cea into biolab:master Aug 6, 2021
@janezd janezd mentioned this pull request Sep 30, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants