fix: 修复日历图标显示异常的问题

某些情况下,日历图标中的3月会显示错位,这部分是因为3月在svg图片中信息和其他月份不一样,当前已修改

Log: 修复部分情况下日历图标显示异常的问题
Influence: 日历图标显示
This commit is contained in:
Fan PengCheng 2022-05-09 18:36:21 +08:00 committed by deepin-bot[bot]
parent c1efb0fb2d
commit 8e14a8d134
3 changed files with 101 additions and 106 deletions

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@ public:
static bool getIcon(QPixmap &pix, const QString iconName, const int size, bool reObtain = false);
private:
static bool createCalendarIcon(const QString &fileName);
static bool createCalendarIcon(const QDate &date, const QString &fileName);
};
#endif // THEMEAPPICON_H

View File

@ -24,6 +24,7 @@
#include <QDebug>
#include <QApplication>
#include <QFile>
#include <QDate>
#include <gtest/gtest.h>
@ -86,6 +87,6 @@ TEST_F(Ut_ThemeAppIcon, getIcon_test4)
TEST_F(Ut_ThemeAppIcon, createCalendarIcon_test)
{
const QString &filePath = "/tmp/calendar.svg";
ASSERT_TRUE(ThemeAppIcon::createCalendarIcon(filePath));
ASSERT_TRUE(ThemeAppIcon::createCalendarIcon(QDate::currentDate(), filePath));
QFile::remove(filePath);
}