From fe00015248249b9c14717fa5b2f94afc077a2a38 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 29 Mar 2024 22:10:14 -0400 Subject: [PATCH] Add background to gallery close/share buttons --- .../Sources/GalleryVC/GalleryItemViewController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift index c5d9f6d1..29a7dd31 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift @@ -90,7 +90,9 @@ class GalleryItemViewController: UIViewController { topControlsView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(topControlsView) - var shareConfig = UIButton.Configuration.plain() + var shareConfig = UIButton.Configuration.gray() + shareConfig.cornerStyle = .capsule + shareConfig.background.backgroundColor = .black.withAlphaComponent(0.25) shareConfig.baseForegroundColor = .white shareConfig.image = UIImage(systemName: "square.and.arrow.up") shareButton = UIButton(configuration: shareConfig) @@ -99,7 +101,9 @@ class GalleryItemViewController: UIViewController { updateShareButton() topControlsView.addSubview(shareButton) - var closeConfig = UIButton.Configuration.plain() + var closeConfig = UIButton.Configuration.gray() + closeConfig.cornerStyle = .capsule + closeConfig.background.backgroundColor = .black.withAlphaComponent(0.25) closeConfig.baseForegroundColor = .white closeConfig.image = UIImage(systemName: "xmark") let closeButton = UIButton(configuration: closeConfig)