Skip to content

Commit 7e736a0

Browse files
committed
Always draw a shadow around the Ice Bar
Closes #469
1 parent c277712 commit 7e736a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: Ice/UI/IceBar/IceBar.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private struct IceBarContentView: View {
260260
screen.hasNotch ? 0 : 2
261261
}
262262

263-
var contentHeight: CGFloat? {
263+
private var contentHeight: CGFloat? {
264264
guard let menuBarHeight = imageCache.menuBarHeight ?? screen.getMenuBarHeight() else {
265265
return nil
266266
}
@@ -278,6 +278,10 @@ private struct IceBarContentView: View {
278278
}
279279
}
280280

281+
private var shadowOpacity: CGFloat {
282+
configuration.current.hasShadow ? 0.5 : 0.33
283+
}
284+
281285
var body: some View {
282286
ZStack {
283287
content
@@ -287,7 +291,7 @@ private struct IceBarContentView: View {
287291
.layoutBarStyle(appState: appState, averageColorInfo: colorManager.colorInfo)
288292
.foregroundStyle(colorManager.colorInfo?.color.brightness ?? 0 > 0.67 ? .black : .white)
289293
.clipShape(clipShape)
290-
.shadow(color: .black.opacity(configuration.current.hasShadow ? 0.5 : 0), radius: 2.5)
294+
.shadow(color: .black.opacity(shadowOpacity), radius: 2.5)
291295

292296
if configuration.current.hasBorder {
293297
clipShape

0 commit comments

Comments
 (0)