Skip to content

Truly independent web browser

LibGfx+UI/Qt+WebContent+Utilities: Remove unused theme color roles

Shannon Booth2c2ff891eb1f
diff --git a/Base/res/themes/Dark.ini b/Base/res/themes/Dark.ini
index a113b7e2aa3..c78e215bc8c 100644
--- a/Base/res/themes/Dark.ini
+++ b/Base/res/themes/Dark.ini
@@ -1,55 +1,18 @@
[Colors]
Accent=#4d4d5f
-DesktopBackground=#202020
-ActiveWindowBorder1=#3d3d4f
-ActiveWindowBorder2=#b7b7da
-ActiveWindowTitle=white
-InactiveWindowBorder1=#606060
-InactiveWindowBorder2=#a0a0a0
-InactiveWindowTitle=#d5d0c7
-MovingWindowBorder1=#49496c
-MovingWindowBorder2=#9c9cd5
-MovingWindowTitle=white
-HighlightWindowBorder1=#47394f
-HighlightWindowBorder2=#8282d9
-HighlightWindowTitle=white
-HighlightSearching=#ffff00
-HighlightSearchingText=black
-MenuBase=#444444
-MenuBaseText=white
-MenuStripe=#323232
-MenuSelection=#666666
-MenuSelectionText=white
Window=#323232
-WindowText=white
Button=#555555
ButtonText=white
Base=#424242
BaseText=white
-DisabledTextFront=#a0a0a0
-DisabledTextBack=#14141a
-ThreedHighlight=#6f6f6f
ThreedShadow1=#3d3e40
-ThreedShadow2=#2e2f30
-HoverHighlight=#696969
Selection=#14141a
InactiveSelection=#606060
LightSelection=#3daee980
DarkSelection=#14141a
-RubberBandFill=#8080803c
-RubberBandBorder=black
Link=#88c
-ActiveLink=#c88
-VisitedLink=#c8c
PlaceholderText=#d5d0c7
Gutter=#505050
-GutterBorder=#666666
-Ruler=#505050
-RulerBorder=#666666
-RulerActiveText=white
-RulerInactiveText=#d5d0c7
-TextCursor=#9c9cd5
-FocusOutline=#606060
SyntaxComment=olivedrab
SyntaxNumber=greenyellow
SyntaxString=orange
@@ -60,11 +23,8 @@ SyntaxKeyword=deepskyblue
SyntaxControlKeyword=orchid
SyntaxIdentifier=lightskyblue
SyntaxPreprocessorStatement=darkgray
-SyntaxPreprocessorValue=orange
Tooltip=#444444
TooltipText=white
-Tray=#323232
-TrayText=white
[Flags]
IsDark=true
diff --git a/Base/res/themes/Default.ini b/Base/res/themes/Default.ini
index 62f64d2ef14..4430d6dc863 100644
--- a/Base/res/themes/Default.ini
+++ b/Base/res/themes/Default.ini
@@ -1,63 +1,18 @@
[Colors]
-DesktopBackground=#505050
Accent=#ab6e4a
-ActiveWindowBorder1=#6e2209
-ActiveWindowBorder2=#f4ca9e
-ActiveWindowTitle=white
-ActiveWindowTitleShadow=#421405
-ActiveWindowTitleStripes=#6e2209
-InactiveWindowBorder1=#808080
-InactiveWindowBorder2=#c0c0c0
-InactiveWindowTitle=#d5d0c7
-InactiveWindowTitleShadow=#4c4c4c
-InactiveWindowTitleStripes=#808080
-MovingWindowBorder1=#a1320d
-MovingWindowBorder2=#fadcbb
-MovingWindowTitle=white
-MovingWindowTitleShadow=#601e07
-MovingWindowTitleStripes=#a1320d
-HighlightWindowBorder1=#a10d0d
-HighlightWindowBorder2=#fabbbb
-HighlightWindowTitle=white
-HighlightWindowTitleShadow=#600707
-HighlightWindowTitleStripes=#a10d0d
-HighlightSearching=#ffff00
-HighlightSearchingText=black
-MenuBase=white
-MenuBaseText=black
-MenuStripe=#dbd8d1
-MenuSelection=#d2c0b6
-MenuSelectionText=black
Window=#d4d0c8
-WindowText=black
Button=#d4d0c8
ButtonText=black
Base=white
BaseText=black
-DisabledTextFront=#808080
-DisabledTextBack=white
-ThreedHighlight=white
ThreedShadow1=#808080
-ThreedShadow2=#404040
-HoverHighlight=#e3dfdb
Selection=#84351a
InactiveSelection=#606060
LightSelection=#84351a
DarkSelection=#3daee980
PlaceholderText=#808080
-RubberBandFill=#f4ca9e3c
-RubberBandBorder=#6e2209
Link=blue
-ActiveLink=red
-VisitedLink=magenta
Gutter=#d4d0c8
-GutterBorder=#404040
-Ruler=#d4d0c8
-RulerBorder=#404040
-RulerActiveText=#404040
-RulerInactiveText=#808080
-TextCursor=#6e2209
-FocusOutline=#909090
SyntaxComment=#a0a1a7
SyntaxNumber=#976715
SyntaxString=#53a053
@@ -68,17 +23,8 @@ SyntaxKeyword=#a42ea2
SyntaxControlKeyword=#a42ea2
SyntaxIdentifier=#000000
SyntaxPreprocessorStatement=#00a0a0
-SyntaxPreprocessorValue=#a00000
-SyntaxFunction=blue
-SyntaxVariable=black
-SyntaxCustomType=orange
-SyntaxNamespace=orange
-SyntaxMember=red
-SyntaxParameter=#eb6d1e
Tooltip=#ffffe1
TooltipText=black
-Tray=#808080
-TrayText=#ffffff
[Flags]
IsDark=false
diff --git a/Libraries/LibGfx/SystemTheme.h b/Libraries/LibGfx/SystemTheme.h
index 5d029a20f6f..2563087bc1a 100644
--- a/Libraries/LibGfx/SystemTheme.h
+++ b/Libraries/LibGfx/SystemTheme.h
@@ -18,72 +18,24 @@ namespace Gfx {
#define ENUMERATE_COLOR_ROLES(C) \
C(Accent) \
- C(ActiveLink) \
- C(ActiveWindowBorder1) \
- C(ActiveWindowBorder2) \
- C(ActiveWindowTitle) \
- C(ActiveWindowTitleShadow) \
- C(ActiveWindowTitleStripes) \
C(Base) \
C(BaseText) \
C(Black) \
C(Blue) \
- C(BrightBlack) \
- C(BrightBlue) \
- C(BrightCyan) \
- C(BrightGreen) \
- C(BrightMagenta) \
- C(BrightRed) \
- C(BrightWhite) \
- C(BrightYellow) \
C(Button) \
C(ButtonText) \
C(ColorSchemeBackground) \
C(ColorSchemeForeground) \
C(Cyan) \
- C(DisabledTextFront) \
- C(DisabledTextBack) \
- C(DesktopBackground) \
- C(FocusOutline) \
C(Green) \
C(Gutter) \
- C(GutterBorder) \
- C(HighlightWindowBorder1) \
- C(HighlightWindowBorder2) \
- C(HighlightWindowTitle) \
- C(HighlightWindowTitleShadow) \
- C(HighlightWindowTitleStripes) \
- C(HighlightSearching) \
- C(HighlightSearchingText) \
- C(HoverHighlight) \
C(InactiveSelection) \
- C(InactiveWindowBorder1) \
- C(InactiveWindowBorder2) \
- C(InactiveWindowTitle) \
- C(InactiveWindowTitleShadow) \
- C(InactiveWindowTitleStripes) \
C(LightSelection) \
C(DarkSelection) \
C(Link) \
C(Magenta) \
- C(MenuBase) \
- C(MenuBaseText) \
- C(MenuSelection) \
- C(MenuSelectionText) \
- C(MenuStripe) \
- C(MovingWindowBorder1) \
- C(MovingWindowBorder2) \
- C(MovingWindowTitle) \
- C(MovingWindowTitleShadow) \
- C(MovingWindowTitleStripes) \
C(PlaceholderText) \
C(Red) \
- C(RubberBandBorder) \
- C(RubberBandFill) \
- C(Ruler) \
- C(RulerActiveText) \
- C(RulerBorder) \
- C(RulerInactiveText) \
C(Selection) \
C(SyntaxComment) \
C(SyntaxControlKeyword) \
@@ -92,28 +44,14 @@ namespace Gfx {
C(SyntaxNumber) \
C(SyntaxOperator) \
C(SyntaxPreprocessorStatement) \
- C(SyntaxPreprocessorValue) \
C(SyntaxPunctuation) \
C(SyntaxString) \
C(SyntaxType) \
- C(SyntaxFunction) \
- C(SyntaxVariable) \
- C(SyntaxCustomType) \
- C(SyntaxNamespace) \
- C(SyntaxMember) \
- C(SyntaxParameter) \
- C(TextCursor) \
- C(ThreedHighlight) \
C(ThreedShadow1) \
- C(ThreedShadow2) \
C(Tooltip) \
C(TooltipText) \
- C(Tray) \
- C(TrayText) \
- C(VisitedLink) \
C(White) \
C(Window) \
- C(WindowText) \
C(Yellow)
#define ENUMERATE_FLAG_ROLES(C) \
diff --git a/Services/WebContent/PageClient.cpp b/Services/WebContent/PageClient.cpp
index bb0cd0c5305..3833c6be927 100644
--- a/Services/WebContent/PageClient.cpp
+++ b/Services/WebContent/PageClient.cpp
@@ -267,7 +267,6 @@ void PageClient::setup_palette()
auto buffer = buffer_or_error.release_value();
auto* theme = buffer.data<Gfx::SystemTheme>();
theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::Magenta).value();
- theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Cyan).value();
m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
}
diff --git a/Services/WebContent/Worker/PageHost.cpp b/Services/WebContent/Worker/PageHost.cpp
index bd6a4f6352d..0e4e6a8a791 100644
--- a/Services/WebContent/Worker/PageHost.cpp
+++ b/Services/WebContent/Worker/PageHost.cpp
@@ -47,7 +47,6 @@ void PageHost::setup_palette()
auto buffer = buffer_or_error.release_value();
auto* theme = buffer.data<Gfx::SystemTheme>();
theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::Magenta).value();
- theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Cyan).value();
m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
}
diff --git a/UI/Qt/WebContentView.cpp b/UI/Qt/WebContentView.cpp
index c6e320684d1..d8374e9ab92 100644
--- a/UI/Qt/WebContentView.cpp
+++ b/UI/Qt/WebContentView.cpp
@@ -2088,12 +2088,8 @@ static Core::AnonymousBuffer make_system_theme_from_qt_palette(QWidget& widget,
palette.set_color(gfx_color_role, new_color);
};
- translate(Gfx::ColorRole::ThreedHighlight, QPalette::ColorRole::Light);
translate(Gfx::ColorRole::ThreedShadow1, QPalette::ColorRole::Mid);
- translate(Gfx::ColorRole::ThreedShadow2, QPalette::ColorRole::Dark);
- translate(Gfx::ColorRole::HoverHighlight, QPalette::ColorRole::Light);
translate(Gfx::ColorRole::Link, QPalette::ColorRole::Link);
- translate(Gfx::ColorRole::VisitedLink, QPalette::ColorRole::LinkVisited);
translate(Gfx::ColorRole::Button, QPalette::ColorRole::Button);
translate(Gfx::ColorRole::ButtonText, QPalette::ColorRole::ButtonText);
// NB: Content whose color scheme is not the palette's own takes the selection color for its scheme.
diff --git a/Utilities/dump-html-tree.cpp b/Utilities/dump-html-tree.cpp
index 292cc047ae2..a47b63f0197 100644
--- a/Utilities/dump-html-tree.cpp
+++ b/Utilities/dump-html-tree.cpp
@@ -74,7 +74,6 @@ private:
auto buffer = MUST(Core::AnonymousBuffer::create_with_size(sizeof(Gfx::SystemTheme)));
auto* theme = buffer.data<Gfx::SystemTheme>();
theme->color[to_underlying(Gfx::ColorRole::Window)] = Color(Color::White).value();
- theme->color[to_underlying(Gfx::ColorRole::WindowText)] = Color(Color::Black).value();
m_palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
}