Reputation: 1
I've been frustrated for some time now trying to figure out how to increase the height of the button in the MenuBarExtra menu for a MacOS app. I've seen another app that has a larger height on these buttons, but I've been unable to replicate the same style nor have I found anything similar on the web.
This is what I have so far. Tried out applying different MenuBarExtraStyle
to it, but what I need is a .menu
style which is of a type PullDownMenuBarExtraStyle
.
MenuBarExtra("Settings", systemImage: "hammer") {
Button(action: {}) {
HStack {
Image(systemName: "pawprint.fill")
Text("Small Button")
}
}
}
.menuBarExtraStyle(.menu)
Upvotes: 0
Views: 1226
Reputation: 12165
If you switch to .menuBarExtraStyle(.window)
you have full control over the display sizes and can build your own menu there.
MenuBarExtra("Settings", systemImage: "hammer") {
VStack {
Button(action: {}) {
Label("Larger Button", systemImage: "pawprint.fill")
.font(.largeTitle)
}
.buttonStyle(.plain)
.padding()
}
}
.menuBarExtraStyle(.window)
Upvotes: 1