Skip to content

Commit

Permalink
fix: Fix misplaced terminal icon in macOS Sonoma (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubik65536 authored Sep 26, 2023
1 parent 4bdac2e commit 4ad6eb8
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,16 @@ struct UtilityAreaTerminalTab: View {
)

Label {
TextField("Name", text: terminalTitle)
.focused($isFocused)
.padding(.leading, -8)
if #available(macOS 14, *) {
// Fix the icon misplacement issue introduced since macOS 14
TextField("Name", text: terminalTitle)
.focused($isFocused)
} else {
// A padding is needed for macOS 13
TextField("Name", text: terminalTitle)
.focused($isFocused)
.padding(.leading, -8)
}
} icon: {
Image(systemName: "terminal")
}
Expand Down

0 comments on commit 4ad6eb8

Please sign in to comment.