summaryrefslogtreecommitdiffstats
path: root/widget/windows/nsLookAndFeel.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-04 23:58:08 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-04 23:58:08 +0100
commita9a672fd681acca009741acf24b5e2076843394d (patch)
treefda76eb6688358f101fc9ac4f4d99b0cc0abab26 /widget/windows/nsLookAndFeel.h
parent7edd685eee95759d66a457cf428f42e0dda94671 (diff)
parent998542d94d86d2bf1f0ac247fcf478c31dcdafec (diff)
downloadUXP-a9a672fd681acca009741acf24b5e2076843394d.tar
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.gz
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.lz
UXP-a9a672fd681acca009741acf24b5e2076843394d.tar.xz
UXP-a9a672fd681acca009741acf24b5e2076843394d.zip
Merge branch 'ported-moebius'
Diffstat (limited to 'widget/windows/nsLookAndFeel.h')
-rw-r--r--widget/windows/nsLookAndFeel.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/widget/windows/nsLookAndFeel.h b/widget/windows/nsLookAndFeel.h
index bc2d158b6..6200541f5 100644
--- a/widget/windows/nsLookAndFeel.h
+++ b/widget/windows/nsLookAndFeel.h
@@ -6,6 +6,7 @@
#ifndef __nsLookAndFeel
#define __nsLookAndFeel
#include "nsXPLookAndFeel.h"
+#include "nsIWindowsRegKey.h"
/*
* Gesture System Metrics
@@ -59,7 +60,33 @@ public:
virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache);
private:
+ /**
+ * Fetches the Windows accent color from the Windows settings if
+ * the accent color is set to apply to the title bar, otherwise
+ * returns an error code.
+ */
+ nsresult GetAccentColor(nscolor& aColor);
+
+ /**
+ * Determines whether the Windows accent color is considered dark
+ * with a threshhold value and formula that are specified in the
+ * UWP guidelines.
+ * See: https://docs.microsoft.com/en-us/windows/uwp/style/color
+ */
+ bool AccentColorIsDark(nscolor aColor);
+
+ /**
+ * If the Windows accent color from the Windows settings is set
+ * to apply to the title bar, this computes the color that should
+ * be used for text that is to be written over a background that has
+ * the accent color. Otherwise, (if the accent color should not
+ * apply to the title bar) this returns an error code.
+ */
+ nsresult GetAccentColorText(nscolor& aColor);
+
int32_t mUseAccessibilityTheme;
+
+ nsCOMPtr<nsIWindowsRegKey> mDwmKey;
};
#endif