!56 fix icon error

Merge pull request !56 from KevinDuan/openkylin/nile
This commit is contained in:
likehomedream 2023-11-22 06:54:20 +00:00 committed by Gitee
commit 58acd22f2b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 10 additions and 10 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
kylin-theme-builder (1.0.0.1-ok1.2) nile; urgency=medium
kylin-theme-builder (1.0.0.1-ok1.3) nile; urgency=medium
* BUG:无
* 需求号: 无

View File

@ -259,20 +259,20 @@ void MainWindow::onGoHomeClicked()
//返回主界面判断,是否在主界面点击返回按钮
if (FileProcess::g_date != nullptr){
//是否存在改动
if(CursorThemeWidget::g_themeChange || ImageWidget::g_themeChange || PlymouthThemeWidget::g_themeChange ||
if(CursorThemeWidget::g_themeChange || IconThemeWidget::g_themeChange || PlymouthThemeWidget::g_themeChange ||
GrubThemeWidget::g_themeChange || GlobalThemeWidget::g_themeChange){
//创建询问是否保存界面
cacheConfirmedWidget *m_cacheConfirmedWidget = new cacheConfirmedWidget();
m_cacheConfirmedWidget->show();
//根据询问界面返回信号处理历史记录
connect(m_cacheConfirmedWidget, &cacheConfirmedWidget::cacheClean, this, [=](){
m_stackedWidget->setCurrentIndex(0);+
m_stackedWidget->setCurrentIndex(0);
//返回主界面前 清除全局变量
FileProcess::g_createThemeType = nullptr;
FileProcess::g_date = nullptr;
FileProcess::g_themeENName = nullptr;
CursorThemeWidget::g_themeChange = false;
ImageWidget::g_themeChange = false;
IconThemeWidget::g_themeChange = false;
PlymouthThemeWidget::g_themeChange = false;
GrubThemeWidget::g_themeChange = false;
GlobalThemeWidget::g_themeChange = false;
@ -284,7 +284,7 @@ void MainWindow::onGoHomeClicked()
FileProcess::g_date = nullptr;
FileProcess::g_themeENName = nullptr;
CursorThemeWidget::g_themeChange = false;
ImageWidget::g_themeChange = false;
IconThemeWidget::g_themeChange = false;
PlymouthThemeWidget::g_themeChange = false;
GrubThemeWidget::g_themeChange = false;
GlobalThemeWidget::g_themeChange = false;
@ -297,7 +297,7 @@ void MainWindow::onGoHomeClicked()
FileProcess::g_date = nullptr;
FileProcess::g_themeENName = nullptr;
CursorThemeWidget::g_themeChange = false;
ImageWidget::g_themeChange = false;
IconThemeWidget::g_themeChange = false;
PlymouthThemeWidget::g_themeChange = false;
GrubThemeWidget::g_themeChange = false;
GlobalThemeWidget::g_themeChange = false;

View File

@ -1,5 +1,7 @@
#include "iconthemewidget.h"
bool IconThemeWidget::g_themeChange;
/**
* @brief
*
@ -115,6 +117,7 @@ void IconThemeWidget::initEditWidget()
m_preview->updateIcon(widgetName, newFilePath);
}
emit newAppIconsMap(m_customiconpathmap);
g_themeChange = true;
}
}
});

View File

@ -40,7 +40,7 @@ public:
void eidtInitWidget(const HistoryInfo &InfoData);
void refresh();
static bool g_themeChange;
signals:
void wallpaperupdate(const QString& filePath);
void newAppIconsMap(QMap<QString, QString> *appiconsmap);

View File

@ -82,7 +82,6 @@ void IconGraphicsView::wheelEvent(QWheelEvent* event)
}
}
bool ImageWidget::g_themeChange;
/**
* @brief ImageWidget构造函数
*
@ -425,7 +424,6 @@ void ImageWidget::updateIcon(const QString& widgetName, const QString& newFilePa
}else {
qDebug() << "Failed to load image:" << newFilePath;
}
g_themeChange = true;
} else {
qDebug() << "Failed to load image:" << newFilePath;
}

View File

@ -54,7 +54,6 @@ public:
void updateIcon(const QString& widgetName, const QString& newFilePath);
void updateImage(const QString& imagePath);
void updateIconMap(const QMap<QString, QString>* newIconMap);
static bool g_themeChange;
private:
const QMap<QString,QString>* m_iconMap;
QPixmap* image;