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.iniindex 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=whiteWindow=#323232-WindowText=whiteButton=#555555ButtonText=whiteBase=#424242BaseText=white-DisabledTextFront=#a0a0a0-DisabledTextBack=#14141a-ThreedHighlight=#6f6f6fThreedShadow1=#3d3e40-ThreedShadow2=#2e2f30-HoverHighlight=#696969Selection=#14141aInactiveSelection=#606060LightSelection=#3daee980DarkSelection=#14141a-RubberBandFill=#8080803c-RubberBandBorder=blackLink=#88c-ActiveLink=#c88-VisitedLink=#c8cPlaceholderText=#d5d0c7Gutter=#505050-GutterBorder=#666666-Ruler=#505050-RulerBorder=#666666-RulerActiveText=white-RulerInactiveText=#d5d0c7-TextCursor=#9c9cd5-FocusOutline=#606060SyntaxComment=olivedrabSyntaxNumber=greenyellowSyntaxString=orange@@ -60,11 +23,8 @@ SyntaxKeyword=deepskyblueSyntaxControlKeyword=orchidSyntaxIdentifier=lightskyblueSyntaxPreprocessorStatement=darkgray-SyntaxPreprocessorValue=orangeTooltip=#444444TooltipText=white-Tray=#323232-TrayText=white[Flags]IsDark=truediff --git a/Base/res/themes/Default.ini b/Base/res/themes/Default.iniindex 62f64d2ef14..4430d6dc863 100644--- a/Base/res/themes/Default.ini+++ b/Base/res/themes/Default.ini@@ -1,63 +1,18 @@[Colors]-DesktopBackground=#505050Accent=#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=blackWindow=#d4d0c8-WindowText=blackButton=#d4d0c8ButtonText=blackBase=whiteBaseText=black-DisabledTextFront=#808080-DisabledTextBack=white-ThreedHighlight=whiteThreedShadow1=#808080-ThreedShadow2=#404040-HoverHighlight=#e3dfdbSelection=#84351aInactiveSelection=#606060LightSelection=#84351aDarkSelection=#3daee980PlaceholderText=#808080-RubberBandFill=#f4ca9e3c-RubberBandBorder=#6e2209Link=blue-ActiveLink=red-VisitedLink=magentaGutter=#d4d0c8-GutterBorder=#404040-Ruler=#d4d0c8-RulerBorder=#404040-RulerActiveText=#404040-RulerInactiveText=#808080-TextCursor=#6e2209-FocusOutline=#909090SyntaxComment=#a0a1a7SyntaxNumber=#976715SyntaxString=#53a053@@ -68,17 +23,8 @@ SyntaxKeyword=#a42ea2SyntaxControlKeyword=#a42ea2SyntaxIdentifier=#000000SyntaxPreprocessorStatement=#00a0a0-SyntaxPreprocessorValue=#a00000-SyntaxFunction=blue-SyntaxVariable=black-SyntaxCustomType=orange-SyntaxNamespace=orange-SyntaxMember=red-SyntaxParameter=#eb6d1eTooltip=#ffffe1TooltipText=black-Tray=#808080-TrayText=#ffffff[Flags]IsDark=falsediff --git a/Libraries/LibGfx/SystemTheme.h b/Libraries/LibGfx/SystemTheme.hindex 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.cppindex 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.cppindex 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.cppindex 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.cppindex 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);}