Keep menu bar tray icons at their natural aspect ratio

Forcing every icon into a square stretched wide symbols such as the
battery into a blocky shape, making them hard to recognise. Scale to fit
instead so wide icons stay long and short.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4.1-flash
This commit is contained in:
2026-09-27 02:21:19 +08:00
parent d9eddf799f
commit 8df3e2cd94
+3
View File
@@ -245,8 +245,11 @@ private struct MenuBarTile: View {
Button { Button {
menuBar.press(item) menuBar.press(item)
} label: { } label: {
// Preserve the symbol's aspect ratio: forcing wide symbols like the
// battery into a square stretches them into a blocky shape.
Image(nsImage: item.icon) Image(nsImage: item.icon)
.resizable() .resizable()
.scaledToFit()
.frame(width: 20, height: 20) .frame(width: 20, height: 20)
.padding(6) .padding(6)
.background( .background(