Skip to content

Commit

Permalink
新功能:添加了快捷键和对应的tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Feb 4, 2023
1 parent cb304c7 commit 1a920dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChuanhuWallpaper/Components/SaveButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct SaveButton: View {
Alert(title: Text("An Error Occured"), message: Text(errorMessage), dismissButton: .cancel())
}
.keyboardShortcut("s")
.help("⌘ S")
}

private func save() {
Expand Down
1 change: 1 addition & 0 deletions ChuanhuWallpaper/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct ContentView: View {
}
}
.keyboardShortcut(KeyEquivalent.escape, modifiers: [])
.help("Esc")
.offset(x: wallpapers.isEmpty ? 200 : 0)
.animation(.spring(), value: wallpapers)
, alignment: .trailing
Expand Down
1 change: 1 addition & 0 deletions ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct WallpaperPlaceholderCell: View {
Text("Choose Photo(s)...").fixedSize(horizontal: false, vertical: true)
}
.keyboardShortcut("i")
.help("⌘ I")
}
}

Expand Down

0 comments on commit 1a920dc

Please sign in to comment.