mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[CHANGE] Fixed the AppRowView background blur effect
This commit is contained in:
committed by
Joe Mattiello
parent
378631e976
commit
a0eb30f98e
@@ -39,7 +39,8 @@ struct AppRowView: View {
|
||||
AppPillButton(app: app)
|
||||
}
|
||||
.padding()
|
||||
.background(Color(storeApp?.tintColor ?? UIColor.black).opacity(0.5))
|
||||
.blurBackground(.systemUltraThinMaterialLight)
|
||||
.background(Color(storeApp?.tintColor ?? UIColor.black).opacity(0.4))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 30, style: .circular))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// VisualEffectView.swift
|
||||
// SideStore
|
||||
//
|
||||
// Created by Fabian Thies on 01.12.22.
|
||||
// Copyright © 2022 SideStore. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct VisualEffectView: UIViewRepresentable {
|
||||
let blurStyle: UIBlurEffect.Style
|
||||
|
||||
func makeUIView(context: Context) -> some UIView {
|
||||
UIVisualEffectView(effect: UIBlurEffect(style: blurStyle))
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIViewType, context: Context) { }
|
||||
}
|
||||
|
||||
|
||||
extension View {
|
||||
@ViewBuilder
|
||||
func blurBackground(_ style: UIBlurEffect.Style) -> some View {
|
||||
self
|
||||
.background(VisualEffectView(blurStyle: style))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user