From 607e021bfc0d230f7bfc336bde121e0f2f49adc2 Mon Sep 17 00:00:00 2001 From: baijunjie Date: Fri, 31 Dec 2021 15:45:34 +0800 Subject: [PATCH] Add the default icon of the settings search item. --- libsearch/file-utils.cpp | 4 +-- libsearch/res/icons/ukui-control-center.svg | 35 +++++++++++++++++++++ libsearch/resource1.qrc | 1 + 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 libsearch/res/icons/ukui-control-center.svg diff --git a/libsearch/file-utils.cpp b/libsearch/file-utils.cpp index 527ebbe..edfd23a 100644 --- a/libsearch/file-utils.cpp +++ b/libsearch/file-utils.cpp @@ -122,7 +122,7 @@ QIcon FileUtils::getSettingIcon(const QString &setting, const bool is_white) { if(file.exists()) { return QIcon(path); } else { - return QIcon::fromTheme("ukui-control-center"); //无插件图标时,返回控制面板应用图标 + return QIcon::fromTheme("ukui-control-center", QIcon(":/res/icons/ukui-control-center.svg")); //无插件图标时,返回控制面板应用图标 // if (is_white) { // return QIcon(QString("/usr/share/ukui-control-center/shell/res/secondaryleftmenu/%1White.svg").arg("About")); // } else { @@ -132,7 +132,7 @@ QIcon FileUtils::getSettingIcon(const QString &setting, const bool is_white) { } QIcon FileUtils::getSettingIcon() { - return QIcon::fromTheme("ukui-control-center"); //返回控制面板应用图标 + return QIcon::fromTheme("ukui-control-center", QIcon(":/res/icons/ukui-control-center.svg")); //返回控制面板应用图标 } /** diff --git a/libsearch/res/icons/ukui-control-center.svg b/libsearch/res/icons/ukui-control-center.svg new file mode 100644 index 0000000..36f48f9 --- /dev/null +++ b/libsearch/res/icons/ukui-control-center.svg @@ -0,0 +1,35 @@ + + + +128 + + + + + + + + + + + + + + + + + + + diff --git a/libsearch/resource1.qrc b/libsearch/resource1.qrc index 4115225..82a7cfb 100644 --- a/libsearch/resource1.qrc +++ b/libsearch/resource1.qrc @@ -11,5 +11,6 @@ res/icons/search-web-dark.svg res/icons/search-web-default.svg res/icons/unknown.svg + res/icons/ukui-control-center.svg