🐛 Fix menubar missing hide

This commit is contained in:
LittleSheep 2025-03-19 00:30:58 +08:00
parent 9f8c8923d9
commit ad16de595b
5 changed files with 19 additions and 4 deletions

View File

@ -846,5 +846,6 @@
"translating": "Translating…",
"translated": "Translated",
"settingsAutoTranslate": "Auto Translate",
"settingsAutoTranslateDescription": "Automatically translate text when viewing posts and messages."
"settingsAutoTranslateDescription": "Automatically translate text when viewing posts and messages.",
"trayMenuHide": "Hide"
}

View File

@ -844,5 +844,6 @@
"translating": "正在翻译……",
"translated": "已翻译",
"settingsAutoTranslate": "自动翻译",
"settingsAutoTranslateDescription": "在查看帖子、消息时自动翻译文本。"
"settingsAutoTranslateDescription": "在查看帖子、消息时自动翻译文本。",
"trayMenuHide": "隐藏"
}

View File

@ -844,5 +844,6 @@
"translating": "正在翻譯……",
"translated": "已翻譯",
"settingsAutoTranslate": "自動翻譯",
"settingsAutoTranslateDescription": "在查看帖子、消息時自動翻譯文本。"
"settingsAutoTranslateDescription": "在查看帖子、消息時自動翻譯文本。",
"trayMenuHide": "隱藏"
}

View File

@ -844,5 +844,6 @@
"translating": "正在翻譯……",
"translated": "已翻譯",
"settingsAutoTranslate": "自動翻譯",
"settingsAutoTranslateDescription": "在查看帖子、消息時自動翻譯文本。"
"settingsAutoTranslateDescription": "在查看帖子、消息時自動翻譯文本。",
"trayMenuHide": "隱藏"
}

View File

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@ -83,6 +84,16 @@ class AppSystemMenuBar extends StatelessWidget {
),
],
),
PlatformMenuItem(
shortcut: const SingleActivator(
LogicalKeyboardKey.keyH,
meta: true,
),
label: 'trayMenuHide'.tr(),
onSelected: () {
appWindow.hide();
},
),
if (onQuit != null)
PlatformMenuItem(
shortcut: const SingleActivator(