Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

fix(ui): stop More menu pill shake and dead edges (#1080)

ALTICafbd56dd33e2
diff --git a/Sources/Fluid/Theme/Components/FluidGlassControls.swift b/Sources/Fluid/Theme/Components/FluidGlassControls.swift
index f5b409f7..20cefec0 100644
--- a/Sources/Fluid/Theme/Components/FluidGlassControls.swift
+++ b/Sources/Fluid/Theme/Components/FluidGlassControls.swift
@@ -192,21 +192,20 @@ private struct FluidQuietActionStyle: ButtonStyle {
}
}
-/// Menus ignore the native glass ButtonStyle on macOS. Style their outer surface instead.
+/// Glass stays outside the menu label; macOS flattens anything drawn inside it.
private struct FluidGlassMenuActionModifier: ViewModifier {
@Environment(\.accessibilityReduceTransparency) private var reduceTransparency
@Environment(\.theme) private var theme
@ViewBuilder func body(content: Content) -> some View {
let menu = content
- .menuStyle(.borderlessButton)
+ .menuStyle(.button)
.menuIndicator(.hidden)
- .buttonStyle(.plain)
- .padding(.horizontal, 14)
- .frame(height: 32)
+ .buttonStyle(FluidGlassMenuActionStyle())
.fixedSize(horizontal: true, vertical: false)
+ // Stationary glass: native menu tracking swallows the release that interactive glass waits for.
if #available(macOS 26, *), !self.reduceTransparency {
- menu.glassEffect(.regular.interactive(), in: .capsule)
+ menu.glassEffect(.regular, in: .capsule)
} else {
menu
.background(self.theme.palette.cardBackground, in: Capsule())
@@ -215,6 +214,16 @@ private struct FluidGlassMenuActionModifier: ViewModifier {
}
}
+/// Padding lives in the label so the whole pill opens the menu.
+private struct FluidGlassMenuActionStyle: ButtonStyle {
+ func makeBody(configuration: Configuration) -> some View {
+ configuration.label
+ .padding(.horizontal, 14)
+ .frame(height: 32)
+ .contentShape(Capsule())
+ }
+}
+
extension View {
func fluidGlassMenuAction() -> some View {
self.modifier(FluidGlassMenuActionModifier())