Skip to content

Commit

Permalink
v1.8.14
Browse files Browse the repository at this point in the history
- Overload for ApplyTheme added.
  • Loading branch information
BlueMystical committed Nov 27, 2024
1 parent 58c3c18 commit 86d082f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SourceFiles/DarkModeCS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,16 @@ public void ApplyTheme(bool pIsDarkMode = true)

}
}
public void ApplyTheme(DisplayMode pColorMode)
{
_IsDarkMode = isDarkMode(); //<- Gets the current color mode from Windows
if (ColorMode != DisplayMode.SystemDefault)
{
_IsDarkMode = ColorMode == DisplayMode.DarkMode ? true : false;
}

ApplyTheme(_IsDarkMode);
}

/// <summary>Recursively apply the Colors from 'OScolors' to the Control and all its childs.</summary>
/// <param name="control">Can be a Form or any Winforms Control.</param>
Expand Down

0 comments on commit 86d082f

Please sign in to comment.