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

Fix ignore selection color for QCalendarWidget on Qt5 #209

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

5yutan5
Copy link
Owner

@5yutan5 5yutan5 commented Dec 12, 2022

This fix #207.

Current QTableView item selection color is set with :selected, not use selection-background-color property.
But on Qt5, QCalendarWidget style ignore pseudo-states of QTableView::item.
I think this is Qt bug.

To fix this bug, I add selection-background-color to QCalendarWidget style.
But this issue cannot be completely fixed.
Because color behavior is different between selection-background-color and :selected.
selection-background-color changes background color but :selected displays selection color overlaid on background color.
Untitled
Untitled 2

@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Merging #209 (e300d4d) into main (30de3a7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #209   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files          39       39           
  Lines        1418     1418           
=======================================
  Hits         1395     1395           
  Misses         23       23           
Impacted Files Coverage Δ
qdarktheme/_resources/_template_stylesheet.py 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@5yutan5 5yutan5 merged commit 2674848 into main Dec 12, 2022
@5yutan5 5yutan5 deleted the fix-calendar-selection-style branch December 12, 2022 19:28
@5yutan5 5yutan5 mentioned this pull request Dec 12, 2022
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.

issue with calendar
1 participant