Skip to content

Commit

Permalink
feat: default hide the icon in the dock (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed May 8, 2024
1 parent ad4e9b4 commit 7d9d25d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ fn main() {
#[cfg(target_os = "macos")]
{
let config = config::get_config_by_app(app.handle()).unwrap();
if config.hide_the_icon_in_the_dock.unwrap_or(false) {
if config.hide_the_icon_in_the_dock.unwrap_or(true) {
app.set_activation_policy(tauri::ActivationPolicy::Accessory);
} else {
app.set_activation_policy(tauri::ActivationPolicy::Regular);
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ pub fn get_translator_window(
.inner_size(620.0, 700.0)
.min_inner_size(540.0, 600.0)
.resizable(true)
.skip_taskbar(config.hide_the_icon_in_the_dock.unwrap_or(false))
.skip_taskbar(config.hide_the_icon_in_the_dock.unwrap_or(true))
.visible(false)
.focused(false);

Expand Down
3 changes: 3 additions & 0 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ export async function getSettings(): Promise<ISettings> {
if (settings.azMaxWords === undefined || settings.azMaxWords === null) {
settings.azMaxWords = 1024
}
if (settings.hideTheIconInTheDock === undefined || settings.hideTheIconInTheDock === null) {
settings.hideTheIconInTheDock = true
}
return settings
}

Expand Down

0 comments on commit 7d9d25d

Please sign in to comment.