Skip to content

Conversation

@22rw
Copy link

@22rw 22rw commented Apr 13, 2023

This change adds system theme detection and context menu styling based on the former. The context menu is now themed according to the users preference.

Preview:
https://i.imgur.com/eZ0lmZf.png

22rw added 3 commits April 13, 2023 10:48
The ColorUtils class is used to determine two things: the system theme (light/dark) and the system accent color. This information can later be used to style the context menu base on the users preferences.
The DarkRenderer is used to render the context menu strip with darkmode friendly styling. Applying the renderer by using the ToolStrip.Renderer property results in a dark context menu.
If the system is using darkmode, the DarkRenderer will be applied to the ToolStrip's Renderer property.
@akorb
Copy link
Owner

akorb commented Apr 13, 2023

Thanks for the PR! That's quite cool. I submitted some modifications.

@22rw
Copy link
Author

22rw commented Apr 15, 2023

Wow, thanks for the extensive refactoring! I merged your pull request in my fork, should i open another PR?

@akorb
Copy link
Owner

akorb commented Apr 15, 2023

Oh, my PR was into your main branch. You can just merge your main branch into your 22rw-Darkmode-Rendering and then the changes will automatically appear here.

@22rw
Copy link
Author

22rw commented Apr 15, 2023

Merged the two branches, the 22rw-Darkmode-Rendering branch in this project should now be up to date with the main branch in my fork. Please feel free to tell me if im doing something wrong, this is my first time contributing code to an osp 😅

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