Truly independent web browser
UI/Qt: Remove unused color, shadow and border helpers
Shannon Boothc6a45ff3fdfc
diff --git a/UI/Qt/ChromeStyle.cpp b/UI/Qt/ChromeStyle.cppindex e997302f4ae..ca7f1d4b7f7 100644--- a/UI/Qt/ChromeStyle.cpp+++ b/UI/Qt/ChromeStyle.cpp@@ -494,12 +494,6 @@ QMenuBar#LadybirdMenuBar QToolButton#LadybirdCloseWindowButton[pressedOutside="tbackground, background_bottom, hover, pressed, control_border, text, disabled_text, close_hover, close_text);}-// Hovering a frameless control only lifts it with this soft fill; its ring appears once it is pressed.-QColor location_edit_border(QPalette const& palette)-{- return Theme::chrome(palette).divider;-}-QString location_edit_style_sheet(QPalette const& palette){auto const& chrome = Theme::chrome(palette);diff --git a/UI/Qt/ChromeStyle.h b/UI/Qt/ChromeStyle.hindex b30f7ab71c7..fdfdfdd34a7 100644--- a/UI/Qt/ChromeStyle.h+++ b/UI/Qt/ChromeStyle.h@@ -71,7 +71,6 @@ QColor chrome_surface_pressed(QPalette const&);QColor chrome_control_border(QPalette const&);QColor chrome_active_tab_surface(QPalette const&);QColor chrome_border(QPalette const&);-QColor location_edit_border(QPalette const&);QColor chrome_separator(QPalette const&);QColor chrome_window_outline(QPalette const&);QColor chrome_accent();diff --git a/UI/Qt/Conversions.h b/UI/Qt/Conversions.hindex 195631443a3..e6135b9fdff 100644--- a/UI/Qt/Conversions.h+++ b/UI/Qt/Conversions.h@@ -29,8 +29,6 @@ using WebView::string_to_ns_data;using WebView::string_to_ns_string;using WebView::utf16_string_to_ns_string;-Gfx::Color ns_color_to_gfx_color(NSColor*);-NSURL* url_to_ns_url(URL::URL const&);}diff --git a/UI/Qt/Conversions.mm b/UI/Qt/Conversions.mmindex fdbd4102d3c..57aa8ad052f 100644--- a/UI/Qt/Conversions.mm+++ b/UI/Qt/Conversions.mm@@ -11,19 +11,6 @@namespace Ladybird {-Gfx::Color ns_color_to_gfx_color(NSColor* color)-{- auto rgb_color = [color colorUsingColorSpace:NSColorSpace.genericRGBColorSpace];- if (rgb_color != nil)- return {- static_cast<u8>([rgb_color redComponent] * 255),- static_cast<u8>([rgb_color greenComponent] * 255),- static_cast<u8>([rgb_color blueComponent] * 255),- static_cast<u8>([rgb_color alphaComponent] * 255)- };- return {};-}-NSURL* url_to_ns_url(URL::URL const& url){auto serialized_url = url.serialize();diff --git a/UI/Qt/MacWindow.h b/UI/Qt/MacWindow.hindex 8b2ad3c4993..dc6368838a1 100644--- a/UI/Qt/MacWindow.h+++ b/UI/Qt/MacWindow.h@@ -58,8 +58,6 @@ void round_appkit_view_corners(QWidget&, qreal radius, QColor const& border_colovoid set_appkit_view_opacity(QWidget&, qreal opacity);// Clips a native view to rounded bottom corners, for a sheet that hangs from what is above it.void round_appkit_view_bottom_corners(QWidget&, qreal radius);-// Casts a shadow around a native view. Being outside of the view, the shadow takes no mouse input.-void cast_appkit_view_shadow(QWidget&, qreal corner_radius, qreal blur_radius, qreal y_offset, QColor const&);// The focus ring around a focused surface: a line right outside its edge, inside a wider, softer ring.struct AppKitViewFocusRing {QColor edge_color;diff --git a/UI/Qt/MacWindow.mm b/UI/Qt/MacWindow.mmindex 81486ed8ca7..14abe8698e2 100644--- a/UI/Qt/MacWindow.mm+++ b/UI/Qt/MacWindow.mm@@ -811,28 +811,6 @@ void round_appkit_view_bottom_corners(QWidget& widget, qreal radius)layer.masksToBounds = YES;}-void cast_appkit_view_shadow(QWidget& widget, qreal corner_radius, qreal blur_radius, qreal y_offset, QColor const& color)-{- if (QGuiApplication::platformName() != "cocoa")- return;- auto* view = reinterpret_cast<NSView*>(widget.winId());- if (!view)- return;- view.wantsLayer = YES;- auto* layer = view.layer;- layer.masksToBounds = NO;- layer.shadowOpacity = 1;- layer.shadowRadius = blur_radius;- // NB: The layer of a view is flipped with it, and Qt's views are, so a positive offset points down.- layer.shadowOffset = CGSizeMake(0, y_offset);- auto* shadow_color = CGColorCreateSRGB(color.redF(), color.greenF(), color.blueF(), color.alphaF());- layer.shadowColor = shadow_color;- CGColorRelease(shadow_color);- auto* shadow_path = CGPathCreateWithRoundedRect(view.bounds, corner_radius, corner_radius, nullptr);- layer.shadowPath = shadow_path;- CGPathRelease(shadow_path);-}-AppKitViewShadow::AppKitViewShadow(){auto* view = [[LadybirdShadowView alloc] initWithFrame:NSZeroRect];