better menu
This commit is contained in:
parent
898a0120b8
commit
fff8be3a96
2 changed files with 21 additions and 3 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
|
@ -35,6 +35,11 @@ jobs:
|
|||
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
|
||||
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: "./src-tauri -> target"
|
||||
|
||||
- name: install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -43,15 +43,28 @@ pub fn run() {
|
|||
let version = env!("CARGO_PKG_VERSION");
|
||||
let version_label = format!("Handy v{}", version);
|
||||
let version_i = MenuItem::with_id(app, "version", &version_label, false, None::<&str>)?;
|
||||
let settings_i = MenuItem::with_id(app, "settings", "Settings", true, None::<&str>)?;
|
||||
|
||||
// Platform-specific accelerators
|
||||
#[cfg(target_os = "macos")]
|
||||
let settings_accelerator = Some("Cmd+,");
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let settings_accelerator = Some("Ctrl+,");
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
let quit_accelerator = Some("Cmd+Q");
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let quit_accelerator = Some("Ctrl+Q");
|
||||
|
||||
let settings_i =
|
||||
MenuItem::with_id(app, "settings", "Settings...", true, settings_accelerator)?;
|
||||
let check_updates_i = MenuItem::with_id(
|
||||
app,
|
||||
"check_updates",
|
||||
"Check for Updates",
|
||||
"Check for Updates...",
|
||||
true,
|
||||
None::<&str>,
|
||||
)?;
|
||||
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
|
||||
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, quit_accelerator)?;
|
||||
let menu = Menu::with_items(
|
||||
app,
|
||||
&[
|
||||
|
|
|
|||
Loading…
Reference in a new issue