feat: 添加mac状态栏播放按键控制功能开关

This commit is contained in:
alger
2025-05-17 14:45:39 +08:00
parent f7951ec22f
commit 2476fbd6e3
6 changed files with 25 additions and 4 deletions
+1
View File
@@ -24,6 +24,7 @@ type SetConfig = {
fontFamily: string;
fontScope: 'global' | 'lyric';
language: string;
showTopAction: boolean;
};
interface StoreType {
set: SetConfig;
+3 -1
View File
@@ -11,6 +11,7 @@ import { join } from 'path';
import type { Language } from '../../i18n/main';
import i18n from '../../i18n/main';
import { getStore } from './config';
// 歌曲信息接口定义
interface SongInfo {
@@ -327,7 +328,8 @@ export function updateTrayMenu(mainWindow: BrowserWindow) {
// 初始化状态栏Tray
function initializeStatusBarTray(mainWindow: BrowserWindow) {
if (process.platform !== 'darwin') return;
const store = getStore()
if (process.platform !== 'darwin' || !store.get('set.showTopAction')) return;
const iconSize = getProperIconSize();