-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add font size and font family and text line-height
- Loading branch information
Showing
35 changed files
with
901 additions
and
750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use tauri::{CustomMenuItem, SystemTray, SystemTrayEvent, SystemTrayMenu, VERSION}; | ||
|
||
pub fn system_tray() -> SystemTray { | ||
let quit = CustomMenuItem::new("quit".to_string(), "退出"); | ||
let tray_menu = SystemTrayMenu::new().add_item(quit); | ||
let tray = SystemTray::new() | ||
.with_tooltip(format!("{} {}", "Chinglish", VERSION).as_str()) | ||
.with_menu(tray_menu) | ||
.on_event(|event| match event { | ||
SystemTrayEvent::MenuItemClick { id, .. } => match id.as_str() { | ||
"quit" => { | ||
std::process::exit(0); | ||
} | ||
_ => {} | ||
}, | ||
SystemTrayEvent::LeftClick { .. } => { | ||
println!("left") | ||
} | ||
SystemTrayEvent::RightClick { .. } => { | ||
println!("right") | ||
} | ||
SystemTrayEvent::DoubleClick { .. } => {} | ||
_ => todo!(), | ||
}); | ||
|
||
return tray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,24 @@ | |
"shell": { | ||
"all": false, | ||
"open": true | ||
}, | ||
"path": { | ||
"all": true | ||
} | ||
}, | ||
"bundle": { | ||
"active": true, | ||
"identifier": "com.chinglish", | ||
"publisher": "USH2A", | ||
"shortDescription": "Chinglish or English?", | ||
"longDescription": "Chinglish or English?", | ||
"icon": ["icons/icon.ico"], | ||
"longDescription": "Chinglish", | ||
"icon": [ | ||
"icons/32x32.png", | ||
"icons/128x128.png", | ||
"icons/[email protected]", | ||
"icons/icon.icns", | ||
"icons/icon.ico" | ||
], | ||
"windows": { | ||
"allowDowngrades": true, | ||
"certificateThumbprint": null, | ||
|
@@ -55,6 +64,10 @@ | |
"width": 800, | ||
"height": 600 | ||
} | ||
] | ||
], | ||
"systemTray": { | ||
"iconPath": "icons/icon.ico", | ||
"iconAsTemplate": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.