diff --git a/frontend/control/list-labels/show-more-label.cpp b/frontend/control/list-labels/show-more-label.cpp
index 35e9fe5..bd1f346 100644
--- a/frontend/control/list-labels/show-more-label.cpp
+++ b/frontend/control/list-labels/show-more-label.cpp
@@ -30,13 +30,13 @@ ShowMoreLabel::ShowMoreLabel(QWidget *parent) : QWidget(parent) {
void ShowMoreLabel::resetLabel() {
m_isOpen = false;
- m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic").pixmap(QSize(16, 16)));
+ m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
}
void ShowMoreLabel::setLabel()
{
m_isOpen = true;
- m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic").pixmap(QSize(16, 16)));
+ m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic", QIcon(":/res/icons/pan-up-symbolic.svg")).pixmap(QSize(16, 16)));
}
/**
@@ -53,7 +53,7 @@ void ShowMoreLabel::initUi() {
m_layout = new QHBoxLayout(this);
m_layout->setContentsMargins(0, 0, 0, 6);
m_iconLabel = new QLabel(this);
- m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic").pixmap(QSize(16, 16)));
+ m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
m_iconLabel->setCursor(QCursor(Qt::PointingHandCursor));
m_iconLabel->installEventFilter(this);
// m_loadingIconLabel = new QLabel(this); //使用图片显示加载状态时,取消此label的注释
@@ -71,11 +71,11 @@ bool ShowMoreLabel::eventFilter(QObject *watched, QEvent *event) {
if(event->type() == QEvent::MouseButtonPress) {
if(! m_timer->isActive()) {
if(!m_isOpen) {
- m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic").pixmap(QSize(16, 16)));
+ m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic", QIcon(":/res/icons/pan-up-symbolic.svg")).pixmap(QSize(16, 16)));
m_isOpen = true;
Q_EMIT this->showMoreClicked();
} else {
- m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic").pixmap(QSize(16, 16)));
+ m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
m_isOpen = false;
Q_EMIT this->retractClicked();
}
diff --git a/frontend/res/icons/pan-down-symbolic.svg b/frontend/res/icons/pan-down-symbolic.svg
new file mode 100644
index 0000000..f941937
--- /dev/null
+++ b/frontend/res/icons/pan-down-symbolic.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/frontend/res/icons/pan-up-symbolic.svg b/frontend/res/icons/pan-up-symbolic.svg
new file mode 100644
index 0000000..4cab334
--- /dev/null
+++ b/frontend/res/icons/pan-up-symbolic.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/frontend/resource.qrc b/frontend/resource.qrc
index 8f84cfb..5910f68 100644
--- a/frontend/resource.qrc
+++ b/frontend/resource.qrc
@@ -6,5 +6,7 @@
res/qt-translations/qt_zh_CN.qm
res/icons/net-disconnected.svg
res/icons/system-search.symbolic.png
+ res/icons/pan-up-symbolic.svg
+ res/icons/pan-down-symbolic.svg
diff --git a/libsearch/file-utils.cpp b/libsearch/file-utils.cpp
index a154e12..901d045 100644
--- a/libsearch/file-utils.cpp
+++ b/libsearch/file-utils.cpp
@@ -58,7 +58,7 @@ QIcon FileUtils::getFileIcon(const QString &uri, bool checkValid) {
nullptr,
nullptr));
if(!G_IS_FILE_INFO(info.get()->get()))
- return QIcon::fromTheme("unknown",QIcon(":res/icons/unknown.png"));
+ return QIcon::fromTheme("unknown",QIcon(":/res/icons/unknown.svg"));
GIcon *g_icon = g_file_info_get_icon(info.get()->get());
//do not unref the GIcon from info.
@@ -76,7 +76,7 @@ QIcon FileUtils::getFileIcon(const QString &uri, bool checkValid) {
}
}
}
- return QIcon::fromTheme("unknown",QIcon(":res/icons/unknown.png"));
+ return QIcon::fromTheme("unknown",QIcon(":/res/icons/unknown.svg"));
}
/**
@@ -91,7 +91,7 @@ QIcon FileUtils::getAppIcon(const QString &path) {
keyfile = g_key_file_new();
if(!g_key_file_load_from_file(keyfile, ba.data(), G_KEY_FILE_NONE, NULL)) {
g_key_file_free(keyfile);
- return QIcon::fromTheme("unknown",QIcon(":res/icons/unknown.png"));
+ return QIcon::fromTheme("unknown",QIcon(":/res/icons/unknown.svg"));
}
QString icon = QString(g_key_file_get_locale_string(keyfile, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL, NULL));
g_key_file_free(keyfile);
diff --git a/libsearch/res/icons/unknown.svg b/libsearch/res/icons/unknown.svg
new file mode 100644
index 0000000..675224a
--- /dev/null
+++ b/libsearch/res/icons/unknown.svg
@@ -0,0 +1,33 @@
+
+
+
diff --git a/libsearch/resource1.qrc b/libsearch/resource1.qrc
index 9f2227b..4115225 100644
--- a/libsearch/resource1.qrc
+++ b/libsearch/resource1.qrc
@@ -10,5 +10,6 @@
res/icons/search-web-icon.svg
res/icons/search-web-dark.svg
res/icons/search-web-default.svg
+ res/icons/unknown.svg