summaryrefslogtreecommitdiff
path: root/widget
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2017-05-04 02:09:29 +0200
committerPale Moon <git-repo@palemoon.org>2017-05-04 02:09:29 +0200
commit096570feaaf6747e400b6ec91dc198adb3b368c8 (patch)
tree2fc09ccda95f41bbd57b84e47514dad617e87fc4 /widget
parent43d47074a81c21a42d3b83e317f7eabaed1c95eb (diff)
downloadpalemoon-gre-096570feaaf6747e400b6ec91dc198adb3b368c8.tar.gz
Remove style rule processing for XP themes.
XP specific themes Luna Blue/Olive/Silver and Royale+Zune removed.
Diffstat (limited to 'widget')
-rw-r--r--widget/LookAndFeel.h5
-rw-r--r--widget/windows/nsUXThemeData.cpp66
-rw-r--r--widget/windows/nsUXThemeData.h11
3 files changed, 13 insertions, 69 deletions
diff --git a/widget/LookAndFeel.h b/widget/LookAndFeel.h
index 870ef4878..f9eda0e3c 100644
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -407,11 +407,6 @@ public:
eWindowsTheme_Generic = 0, // unrecognized theme
eWindowsTheme_Classic,
eWindowsTheme_Aero,
- eWindowsTheme_LunaBlue,
- eWindowsTheme_LunaOlive,
- eWindowsTheme_LunaSilver,
- eWindowsTheme_Royale,
- eWindowsTheme_Zune,
eWindowsTheme_AeroLite
};
diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp
index 96d04b02d..f787bcc7c 100644
--- a/widget/windows/nsUXThemeData.cpp
+++ b/widget/windows/nsUXThemeData.cpp
@@ -236,16 +236,7 @@ struct THEMELIST {
const THEMELIST knownThemes[] = {
{ L"aero.msstyles", WINTHEME_AERO },
- { L"aerolite.msstyles", WINTHEME_AERO_LITE },
- { L"luna.msstyles", WINTHEME_LUNA },
- { L"zune.msstyles", WINTHEME_ZUNE },
- { L"royale.msstyles", WINTHEME_ROYALE }
-};
-
-const THEMELIST knownColors[] = {
- { L"normalcolor", WINTHEMECOLOR_NORMAL },
- { L"homestead", WINTHEMECOLOR_HOMESTEAD },
- { L"metallic", WINTHEMECOLOR_METALLIC }
+ { L"aerolite.msstyles", WINTHEME_AERO_LITE }
};
LookAndFeel::WindowsTheme
@@ -332,57 +323,24 @@ nsUXThemeData::UpdateNativeThemeInfo()
if (theme == WINTHEME_UNRECOGNIZED)
return;
- // We're using the default theme if we're using any of Aero, Aero Lite, or
- // luna. However, on Win8, GetCurrentThemeName (see above) returns
- // AeroLite.msstyles for the 4 builtin highcontrast themes as well. Those
+ // We're using the default theme if we're using any of Aero or Aero Lite.
+ // However, on Win8, GetCurrentThemeName (see above) returns
+ // AeroLite.msstyles for the 4 builtin high contrast themes as well. Those
// themes "don't count" as default themes, so we specifically check for high
// contrast mode in that situation.
if (!(IsWin8OrLater() && sIsHighContrastOn) &&
- (theme == WINTHEME_AERO || theme == WINTHEME_AERO_LITE || theme == WINTHEME_LUNA)) {
+ (theme == WINTHEME_AERO || theme == WINTHEME_AERO_LITE)) {
sIsDefaultWindowsTheme = true;
}
- if (theme != WINTHEME_LUNA) {
- switch(theme) {
- case WINTHEME_AERO:
- sThemeId = LookAndFeel::eWindowsTheme_Aero;
- return;
- case WINTHEME_AERO_LITE:
- sThemeId = LookAndFeel::eWindowsTheme_AeroLite;
- return;
- case WINTHEME_ZUNE:
- sThemeId = LookAndFeel::eWindowsTheme_Zune;
- return;
- case WINTHEME_ROYALE:
- sThemeId = LookAndFeel::eWindowsTheme_Royale;
- return;
- default:
- NS_WARNING("unhandled theme type.");
- return;
- }
- }
-
- // calculate the luna color scheme
- WindowsThemeColor color = WINTHEMECOLOR_UNRECOGNIZED;
- for (size_t i = 0; i < ArrayLength(knownColors); ++i) {
- if (!lstrcmpiW(themeColor, knownColors[i].name)) {
- color = (WindowsThemeColor)knownColors[i].type;
+ switch(theme) {
+ case WINTHEME_AERO:
+ sThemeId = LookAndFeel::eWindowsTheme_Aero;
+ break;
+ case WINTHEME_AERO_LITE:
+ sThemeId = LookAndFeel::eWindowsTheme_AeroLite;
break;
- }
- }
-
- switch(color) {
- case WINTHEMECOLOR_NORMAL:
- sThemeId = LookAndFeel::eWindowsTheme_LunaBlue;
- return;
- case WINTHEMECOLOR_HOMESTEAD:
- sThemeId = LookAndFeel::eWindowsTheme_LunaOlive;
- return;
- case WINTHEMECOLOR_METALLIC:
- sThemeId = LookAndFeel::eWindowsTheme_LunaSilver;
- return;
default:
- NS_WARNING("unhandled theme color.");
- return;
+ NS_WARNING("unhandled theme type.");
}
}
diff --git a/widget/windows/nsUXThemeData.h b/widget/windows/nsUXThemeData.h
index 2688ec659..bc61acd68 100644
--- a/widget/windows/nsUXThemeData.h
+++ b/widget/windows/nsUXThemeData.h
@@ -61,16 +61,7 @@ enum WindowsTheme {
WINTHEME_UNRECOGNIZED = 0,
WINTHEME_CLASSIC = 1, // no theme
WINTHEME_AERO = 2,
- WINTHEME_LUNA = 3,
- WINTHEME_ROYALE = 4,
- WINTHEME_ZUNE = 5,
- WINTHEME_AERO_LITE = 6
-};
-enum WindowsThemeColor {
- WINTHEMECOLOR_UNRECOGNIZED = 0,
- WINTHEMECOLOR_NORMAL = 1,
- WINTHEMECOLOR_HOMESTEAD = 2,
- WINTHEMECOLOR_METALLIC = 3
+ WINTHEME_AERO_LITE = 3
};
#define CMDBUTTONIDX_MINIMIZE 0