FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Try to get the WindowBaseColor in HighContrast mode by punker76 · Pull Request #132 · ControlzEx/ControlzEx · GitHub

Try to get the WindowBaseColor in HighContrast mode - #132

Merged
batzen merged 2 commits into
developfrom
features/HighContrast-Window-BaseColor
Aug 4, 2020
Merged

batzen merged 2 commits into
developfrom
features/HighContrast-Window-BaseColor

Conversation

punker76 commented Jul 26, 2020
edited
Loading

Copy link
Copy Markdown
Member

Describe the changes you have made to improve this project

  • Use the WIndowBrush for getting the WindowBaseColor in HighContrast mode (Use the System.Drawing GetBrightness to decide between dark and light)

Unit test

  • Static classes can not be mocked. So maybe we can do this without any tests.

Additional context

Reason for the PR comes from MahApps: High contrast theme is not getting applied #3880

Idea

In order to fix another issue with HighContrast mode we should first search for an existing theme without an accent color. Because normally there is only one HighContrast theme (like in UWP).

So an app with custom themes should only have two themes, one for light and one for dark if no other will be found.

punker76 requested a review from batzen July 26, 2020 22:05

batzen commented Aug 1, 2020

Copy link
Copy Markdown
Member

I am not sure if we should do it this way.
GetWindowsBaseColor should do what it's name says. If we check for high contrast there and return something different it's not the windows base color anymore.
In which way does this fix the linked issue?

In order to fix another issue with HighContrast mode we should first search for an existing theme without an accent color. Because normally there is only one HighContrast theme (like in UWP).

Windows itself has different high contrast themes doesn't it? The settings app exposes 4 different high contrast themes on my machine.
If a developer chooses to provide high contrast themes and only want to provide two (one dark, one light) and does not want different ones for different accent colors they should just turn off accent color sync, shouldn't they?

batzen commented Aug 1, 2020
edited
Loading

Copy link
Copy Markdown
Member

If a developer chooses to provide high contrast themes and only want to provide two (one dark, one light) and does not want different ones for different accent colors they should just turn off accent color sync, shouldn't they?

We could, and maybe really should, check if we find a theme that has high contrast and the accent color and if we don't find any just choose a high contrast theme without the accent color. But we'd need some way to express this option. Not sure where and how we should add that.

batzen merged commit 50ee015 into develop Aug 4, 2020
punker76 deleted the features/HighContrast-Window-BaseColor branch August 5, 2020 09:09
punker76 added this to the 4.4.0 milestone Oct 31, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL