ukui-sidebar/fix-plugin-icon.patch
2020-07-09 10:39:59 +08:00

21 lines
1014 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -ur ukui-sidebar-1.1.0/src/sidebarpluginswidgets.cpp ukui-sidebar-1.1.0~/src/sidebarpluginswidgets.cpp
--- ukui-sidebar-1.1.0/src/sidebarpluginswidgets.cpp 2020-06-18 14:31:44.000000000 +0800
+++ ukui-sidebar-1.1.0~/src/sidebarpluginswidgets.cpp 2020-06-24 16:51:03.000000000 +0800
@@ -407,7 +407,14 @@
{
QToolButton *p_ToolButton = new QToolButton();
p_ToolButton->setFixedSize(90,90);
- QPixmap pixmap = QIcon::fromTheme(icon).pixmap(QSize(45, 45));
+ //显示错误暂时读qrc文件中的icon
+ //QPixmap pixmap = QIcon::fromTheme(icon).pixmap(QSize(45, 45));
+ QPixmap pixmap;
+ if(icon.contains("feedback")) {
+ pixmap = QIcon(QString(":/data/images/%1.png").arg(icon)).pixmap(QSize(45, 45));
+ } else {
+ pixmap = QIcon(QString(":/data/images/%1.svg").arg(icon)).pixmap(QSize(45, 45));
+ }
QLabel *IconLabel = new QLabel();
IconLabel->setFixedSize(45, 45);
IconLabel->setPixmap(pixmap);
Only in ukui-sidebar-1.1.0~: ukui-sidebar.pro.user