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

The window title bar background color adapts to the system theme #1575

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

godcop
Copy link
Contributor

@godcop godcop commented Jan 11, 2025

Currently, the default window title bar of the Windows platform is fixed to white. I added a function to determine whether the system theme is dark or light, so that the title bar can adapt to the system theme.

@@ -272,6 +275,21 @@ def __init__(self, window, cache_dir):
def __str__(self):
return f'<System.Windows.Forms object with {self.Handle} handle>'

def get_system_theme(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be more explicit this function could be named is_dark_theme and return True or False

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