diff --git a/.gitignore b/.gitignore index 6fe4004..21d239c 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ debian/*.substvars debian/spark-store .vscode/* +src/spark-store diff --git a/src/mainwindow-dtk.cpp b/src/mainwindow-dtk.cpp index 48155bb..1e1e210 100644 --- a/src/mainwindow-dtk.cpp +++ b/src/mainwindow-dtk.cpp @@ -141,7 +141,7 @@ void MainWindow::initTitleBar() { ui->titlebar->setIcon(QIcon::fromTheme("spark-store")); ui->titlebar->setBackgroundTransparent(true); - // ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单 + ui->titlebar->setSwitchThemeMenuVisible(false); // 去除 dtk 标题栏主题切换菜单 // 初始化标题栏控件 DLabel *title = new DLabel(ui->titlebar); @@ -323,14 +323,20 @@ void MainWindow::refreshTheme(bool isDarkMode) void MainWindow::onThemeChanged(bool isDark) { DGuiApplicationHelper::ColorType currentTheme = DGuiApplicationHelper::instance()->themeType(); - // 检查是否用户手动设置为暗色模式 - bool isUserSetDark = (currentTheme == DGuiApplicationHelper::DarkType); - bool isUserSetWhite = !(currentTheme == DGuiApplicationHelper::LightType); + // 检查当前外观设置 + bool isUserSetDark = (currentTheme == DGuiApplicationHelper::DarkType); //当前已经是深色模式 + bool isUserSetWhite = (currentTheme == DGuiApplicationHelper::LightType); //当前已经是浅色模式 - if (!isUserSetDark && !isUserSetWhite) { + // 检查 isDark 为 true 时, isUserSetDark 是否为 true + // 检查 isDark 为 false , isUserSetWhite 是否为 ture + qDebug() << isUserSetDark << isUserSetWhite << isDark; + + + if ((isUserSetDark != isDark) || (isUserSetWhite == !isDark)) { // 否则,根据传入的 isDark 值设置 refreshTheme(isDark); } + } diff --git a/translations/spark-store_en.ts b/translations/spark-store_en.ts index 1579777..aa11124 100644 --- a/translations/spark-store_en.ts +++ b/translations/spark-store_en.ts @@ -480,33 +480,33 @@ - + Submit App - + Submit App with client(Recommanded) - + Settings - + APP Upgrade and Install Settings - - + + Spark Store - + Search or enter spk:// @@ -516,7 +516,7 @@ - + Spark Store @@ -536,7 +536,7 @@ - + Show MainWindow @@ -658,12 +658,12 @@ TitleBarMenu - + About - + Exit diff --git a/translations/spark-store_es.ts b/translations/spark-store_es.ts index bb740a2..28ee71c 100644 --- a/translations/spark-store_es.ts +++ b/translations/spark-store_es.ts @@ -480,33 +480,33 @@ Actualización de app - + Submit App Presentación de la aplicación - + Submit App with client(Recommanded) Enviar la aplicación al cliente (recomendación) - + Settings Configuración - + APP Upgrade and Install Settings Actualización e instalación de app - - + + Spark Store SPARK Store - + Search or enter spk:// Buscar o introducir spk: /% @@ -516,7 +516,7 @@ - + Spark Store SPARK Store @@ -536,7 +536,7 @@ Descargar lista - + Show MainWindow Mostrar la ventana principal @@ -658,12 +658,12 @@ TitleBarMenu - + About Sobre - + Exit Exportaciones diff --git a/translations/spark-store_fr.ts b/translations/spark-store_fr.ts index abde11d..5801d28 100644 --- a/translations/spark-store_fr.ts +++ b/translations/spark-store_fr.ts @@ -480,33 +480,33 @@ Mise à niveau app - + Submit App Soumettre une application - + Submit App with client(Recommanded) Soumettre une demande au client (recommandé) - + Settings Paramètres - + APP Upgrade and Install Settings Paramètres de mise à niveau et d'installation de l'app - - + + Spark Store Le Spark store - + Search or enter spk:// Rechercher ou entrer SPK / @@ -516,7 +516,7 @@ - + Spark Store Le Spark store @@ -536,7 +536,7 @@ Télécharger la Liste - + Show MainWindow Afficher la fenêtre principale @@ -658,12 +658,12 @@ TitleBarMenu - + About À propos - + Exit Exportations diff --git a/translations/spark-store_zh_CN.ts b/translations/spark-store_zh_CN.ts index 7cb6ae0..8ebdcae 100644 --- a/translations/spark-store_zh_CN.ts +++ b/translations/spark-store_zh_CN.ts @@ -480,33 +480,33 @@ 更新 - + Submit App 投递应用 - + Submit App with client(Recommanded) 使用本地投稿器投递应用(推荐) - + Settings 设置 - + APP Upgrade and Install Settings 应用更新和安装设置 - - + + Spark Store 星火应用商店 - + Search or enter spk:// 搜索或打开链接 @@ -516,7 +516,7 @@ - + Spark Store 星火应用商店 @@ -536,7 +536,7 @@ 下载列表 - + Show MainWindow 显示主窗口 @@ -658,12 +658,12 @@ TitleBarMenu - + About 关于 - + Exit 退出 diff --git a/translations/spark-store_zh_TW.ts b/translations/spark-store_zh_TW.ts index 4aa4b63..3c2f0c3 100644 --- a/translations/spark-store_zh_TW.ts +++ b/translations/spark-store_zh_TW.ts @@ -480,33 +480,33 @@ 軟體更新 - + Submit App 上傳軟體 - + Submit App with client(Recommanded) 從客戶端上傳軟體(推薦的) - + Settings 設定 - + APP Upgrade and Install Settings 軟體升級 和 安裝設定 - - + + Spark Store 星火应用商店 - + Search or enter spk:// 搜索或打开链接 @@ -516,7 +516,7 @@ - + Spark Store 星火应用商店 @@ -536,7 +536,7 @@ 下载列表 - + Show MainWindow 显示主窗口 @@ -658,12 +658,12 @@ TitleBarMenu - + About 关于 - + Exit 退出