Repository navigation
Tidy up colour mode handling (#1085) - #1086
Merged
Merged
Conversation
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1085.
UI.ApplyColorOverridesremoved.UpdateColorControlsalready handles tab pages and buttons for each theme. In Light it was also turning the main window's tab pages grey and putting the Update Available button on the standard look so those two are now set inUI.Designer.csand nothing changes on screen.TVSettings.ColorModeandColorModeActualremoved. The colour mode now comes from the theme asThemeManager.SystemColorMode(Dark for a dark based theme, otherwise Classic) andIsDarkis built on it. I put it in ThemeManager next toActiveThemerather than on TVSettings, since that is where the current theme lives.Application.SetColorModeis called once inOnCreateMainFormafterThemeManager.Load(). The calls inProgram.Mainand theOnInitializeoverride ran before the settings were loaded so they always set Classic which is already the default.ThemeManager.IsDark. The one check that can't is the start-up one inOnCreateMainForm.IsDarkalso needsApplication.IsDarkModeEnabledwhich only turns on with theSetColorModecall right below it so that check readsThemeManager.SystemColorMode.The
btnUpdateAvailablehasBackColor = ActiveCaptionin the designer but it looks like the old override has been putting it on the standard look. I left it with today's look. You can setUseVisualStyleBackColorto false if you prefer.