Skip to content

Commit

Permalink
fix macos quit hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Carsten König committed Oct 10, 2024
1 parent 631bced commit cb67704
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub fn run() {
.with_shortcut("CmdOrCtrl+Q")?
.with_handler(|_app, shortcut, event| {
if event.state == ShortcutState::Pressed {
if shortcut.matches(Modifiers::CONTROL, Code::KeyQ) {
if shortcut.matches(Modifiers::CONTROL, Code::KeyQ)
|| shortcut.matches(Modifiers::SUPER, Code::KeyQ)
{
std::process::exit(0);
}
}
Expand Down
12 changes: 6 additions & 6 deletions src-tauri/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use tauri::{App, Wry};

pub fn menu(app: &mut App) -> Result<Menu<Wry>, tauri::Error> {
let metadata = AboutMetadataBuilder::new()
.version(Some(app.package_info().version.to_string()))
.authors(Some(vec![app.package_info().authors.to_string()]))
.comments(Some(app.package_info().description))
.website(Some("https://elasticvue.com"))
.icon(app.default_window_icon().map(|img| img.clone()))
.build();
.version(Some(app.package_info().version.to_string()))
.authors(Some(vec![app.package_info().authors.to_string()]))
.comments(Some(app.package_info().description))
.website(Some("https://elasticvue.com"))
.icon(app.default_window_icon().map(|img| img.clone()))
.build();

let about_quit = SubmenuBuilder::new(app, app.package_info().name.clone())
.about(metadata.into())
Expand Down

0 comments on commit cb67704

Please sign in to comment.