Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
index 49299ad156..b8ace0dbbd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs
@@ -47,6 +47,19 @@ namespace MonoDevelop.Components
public static Theme UserInterfaceTheme { get; private set; }
+ static bool? highContrastThemeEnabled;
+ internal static bool HighContrastThemeEnabled {
+ get {
+ return highContrastThemeEnabled ?? false;
+ }
+ set {
+ if (highContrastThemeEnabled != value) {
+ highContrastThemeEnabled = value;
+ UpdateStyles ();
+ }
+ }
+ }
+
static IdeTheme ()
{
DefaultGtkDataFolder = Environment.GetEnvironmentVariable ("GTK_DATA_PREFIX");
@@ -101,7 +114,7 @@ namespace MonoDevelop.Components
internal static void SetupXwtTheme ()
{
- Xwt.Drawing.Context.RegisterStyles ("dark", "disabled", "error");
+ Xwt.Drawing.Context.RegisterStyles ("dark", "disabled", "error", "contrast");
if (Core.Platform.IsMac) {
Xwt.Drawing.Context.RegisterStyles ("mac", "sel");
@@ -252,6 +265,11 @@ namespace MonoDevelop.Components
else
Xwt.Drawing.Context.ClearGlobalStyle ("dark");
+ if (HighContrastThemeEnabled)
+ Xwt.Drawing.Context.SetGlobalStyle ("contrast");
+ else
+ Xwt.Drawing.Context.ClearGlobalStyle ("contrast");
+
Styles.LoadStyle ();
UpdateXwtDefaults ();
#if MAC