mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-10-25 03:32:21 +08:00
Merge branch 'darkmodeenhanced' into dev
This commit is contained in:
commit
1a98dae4f8
1
.gitignore
vendored
1
.gitignore
vendored
@ -53,3 +53,4 @@ debian/*.substvars
|
||||
debian/spark-store
|
||||
|
||||
.vscode/*
|
||||
src/spark-store
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -480,33 +480,33 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<source>Submit App</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="188"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="191"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="192"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="146"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="241"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="148"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="243"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="151"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="153"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -516,7 +516,7 @@
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="35"/>
|
||||
<location filename="../src/application.cpp" line="36"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Spark Store</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -536,7 +536,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="244"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -658,12 +658,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="245"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="247"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="248"/>
|
||||
<source>Exit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@ -480,33 +480,33 @@
|
||||
<translation>Actualización de app</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<source>Submit App</source>
|
||||
<translation>Presentación de la aplicación</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="188"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>Enviar la aplicación al cliente (recomendación)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="191"/>
|
||||
<source>Settings</source>
|
||||
<translation>Configuración</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="192"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>Actualización e instalación de app</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="146"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="241"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="148"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="243"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>SPARK Store</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="151"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="153"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>Buscar o introducir spk: /%</translation>
|
||||
</message>
|
||||
@ -516,7 +516,7 @@
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="35"/>
|
||||
<location filename="../src/application.cpp" line="36"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>SPARK Store</translation>
|
||||
</message>
|
||||
@ -536,7 +536,7 @@
|
||||
<translation>Descargar lista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="244"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>Mostrar la ventana principal</translation>
|
||||
</message>
|
||||
@ -658,12 +658,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="245"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="247"/>
|
||||
<source>About</source>
|
||||
<translation>Sobre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="248"/>
|
||||
<source>Exit</source>
|
||||
<translation>Exportaciones</translation>
|
||||
</message>
|
||||
|
||||
@ -480,33 +480,33 @@
|
||||
<translation>Mise à niveau app</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<source>Submit App</source>
|
||||
<translation>Soumettre une application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="188"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>Soumettre une demande au client (recommandé)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="191"/>
|
||||
<source>Settings</source>
|
||||
<translation>Paramètres</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="192"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>Paramètres de mise à niveau et d'installation de l'app</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="146"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="241"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="148"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="243"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>Le Spark store</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="151"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="153"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>Rechercher ou entrer SPK /</translation>
|
||||
</message>
|
||||
@ -516,7 +516,7 @@
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="35"/>
|
||||
<location filename="../src/application.cpp" line="36"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>Le Spark store</translation>
|
||||
</message>
|
||||
@ -536,7 +536,7 @@
|
||||
<translation>Télécharger la Liste</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="244"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>Afficher la fenêtre principale</translation>
|
||||
</message>
|
||||
@ -658,12 +658,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="245"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="247"/>
|
||||
<source>About</source>
|
||||
<translation>À propos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="248"/>
|
||||
<source>Exit</source>
|
||||
<translation>Exportations</translation>
|
||||
</message>
|
||||
|
||||
@ -480,33 +480,33 @@
|
||||
<translation>更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<source>Submit App</source>
|
||||
<translation>投递应用</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="188"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>使用本地投稿器投递应用(推荐)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="191"/>
|
||||
<source>Settings</source>
|
||||
<translation>设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="192"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>应用更新和安装设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="146"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="241"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="148"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="243"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="151"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="153"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>搜索或打开链接</translation>
|
||||
</message>
|
||||
@ -516,7 +516,7 @@
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="35"/>
|
||||
<location filename="../src/application.cpp" line="36"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
@ -536,7 +536,7 @@
|
||||
<translation>下载列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="244"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>显示主窗口</translation>
|
||||
</message>
|
||||
@ -658,12 +658,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="245"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="247"/>
|
||||
<source>About</source>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="248"/>
|
||||
<source>Exit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
|
||||
@ -480,33 +480,33 @@
|
||||
<translation>軟體更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="187"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<source>Submit App</source>
|
||||
<translation>上傳軟體</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="188"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<source>Submit App with client(Recommanded)</source>
|
||||
<translation>從客戶端上傳軟體(推薦的)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="189"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="191"/>
|
||||
<source>Settings</source>
|
||||
<translation>設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="190"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="192"/>
|
||||
<source>APP Upgrade and Install Settings</source>
|
||||
<translation>軟體升級 和 安裝設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="146"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="241"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="148"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="243"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="151"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="153"/>
|
||||
<source>Search or enter spk://</source>
|
||||
<translation>搜索或打开链接</translation>
|
||||
</message>
|
||||
@ -516,7 +516,7 @@
|
||||
<message>
|
||||
<location filename="../src/application.cpp" line="35"/>
|
||||
<location filename="../src/application.cpp" line="36"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="126"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="128"/>
|
||||
<source>Spark Store</source>
|
||||
<translation>星火应用商店</translation>
|
||||
</message>
|
||||
@ -536,7 +536,7 @@
|
||||
<translation>下载列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="244"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<source>Show MainWindow</source>
|
||||
<translation>显示主窗口</translation>
|
||||
</message>
|
||||
@ -658,12 +658,12 @@
|
||||
<context>
|
||||
<name>TitleBarMenu</name>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="245"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="247"/>
|
||||
<source>About</source>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="246"/>
|
||||
<location filename="../src/mainwindow-dtk.cpp" line="248"/>
|
||||
<source>Exit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user