From 1a920dc374a7241113cce9147b7474261c7f9bf6 Mon Sep 17 00:00:00 2001 From: Tuchuanhuhuhu Date: Sat, 4 Feb 2023 16:16:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD=EF=BC=9A=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E5=BF=AB=E6=8D=B7=E9=94=AE=E5=92=8C=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E7=9A=84tooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChuanhuWallpaper/Components/SaveButton.swift | 1 + ChuanhuWallpaper/ContentView.swift | 1 + ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift | 1 + 3 files changed, 3 insertions(+) diff --git a/ChuanhuWallpaper/Components/SaveButton.swift b/ChuanhuWallpaper/Components/SaveButton.swift index 478c78a..434a19a 100644 --- a/ChuanhuWallpaper/Components/SaveButton.swift +++ b/ChuanhuWallpaper/Components/SaveButton.swift @@ -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() { diff --git a/ChuanhuWallpaper/ContentView.swift b/ChuanhuWallpaper/ContentView.swift index 4b216e1..66a9f96 100644 --- a/ChuanhuWallpaper/ContentView.swift +++ b/ChuanhuWallpaper/ContentView.swift @@ -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 diff --git a/ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift b/ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift index 280dfe0..1c91e16 100644 --- a/ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift +++ b/ChuanhuWallpaper/View/WallpaperPlaceholderCell.swift @@ -64,6 +64,7 @@ struct WallpaperPlaceholderCell: View { Text("Choose Photo(s)...").fixedSize(horizontal: false, vertical: true) } .keyboardShortcut("i") + .help("⌘ I") } }