@@ -255,6 +255,10 @@ private struct MenuBarSearchContentView: View {
255
255
256
256
private func updateDisplayedItems( ) {
257
257
let searchItems : [ ( listItem: ListItem , title: String ) ] = MenuBarSection . Name. allCases. reduce ( into: [ ] ) { items, section in
258
+ if itemManager. appState? . menuBarManager. section ( withName: section) ? . isEnabled == false {
259
+ return
260
+ }
261
+
258
262
let headerItem = ListItem . header ( id: . header( section) ) {
259
263
Text ( section. displayString)
260
264
. fontWeight ( . semibold)
@@ -323,8 +327,9 @@ private struct BottomBarButton<Content: View>: View {
323
327
content
324
328
. padding ( 3 )
325
329
. background {
326
- VisualEffectView ( material: . selection, blendingMode: . withinWindow)
327
- . clipShape ( RoundedRectangle ( cornerRadius: 5 , style: . circular) )
330
+ RoundedRectangle ( cornerRadius: 5 , style: . circular)
331
+ . fill ( . regularMaterial)
332
+ . brightness ( 0.25 )
328
333
. opacity ( isPressed ? 0.5 : isHovering ? 0.25 : 0 )
329
334
}
330
335
. contentShape ( Rectangle ( ) )
@@ -380,8 +385,9 @@ private struct ShowItemButton: View {
380
385
. padding ( . horizontal, 7 )
381
386
. padding ( . vertical, 5 )
382
387
. background {
383
- VisualEffectView ( material: . selection, blendingMode: . withinWindow)
384
- . clipShape ( RoundedRectangle ( cornerRadius: 3 , style: . circular) )
388
+ RoundedRectangle ( cornerRadius: 3 , style: . circular)
389
+ . fill ( . regularMaterial)
390
+ . brightness ( 0.25 )
385
391
. opacity ( 0.5 )
386
392
}
387
393
}
@@ -403,7 +409,7 @@ private struct MenuBarSearchItemView: View {
403
409
404
410
private var image : NSImage ? {
405
411
guard
406
- let image = imageCache. images [ item. info] ,
412
+ let image = imageCache. images [ item. info] ? . trimmingTransparentPixels ( around : [ . minXEdge , . maxXEdge ] ) ,
407
413
let screen = imageCache. screen
408
414
else {
409
415
return nil
@@ -442,10 +448,9 @@ private struct MenuBarSearchItemView: View {
442
448
private var imageViewWithBackground : some View {
443
449
if let image {
444
450
ZStack {
445
- VisualEffectView ( material: . selection, blendingMode: . behindWindow)
446
- . clipShape (
447
- RoundedRectangle ( cornerRadius: 5 , style: . circular)
448
- )
451
+ RoundedRectangle ( cornerRadius: 5 , style: . circular)
452
+ . fill ( . regularMaterial)
453
+ . brightness ( 0.25 )
449
454
. opacity ( 0.75 )
450
455
. frame ( width: item. frame. width)
451
456
. overlay {
0 commit comments