PluginView: Refresh icons
HighDPI Change-Id: If84b5f1642317d2cbc900cb1122f81e4790b0e39 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 137 B |
BIN
src/libs/extensionsystem/images/error@2x.png
Normal file
|
After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 94 B |
BIN
src/libs/extensionsystem/images/notloaded@2x.png
Normal file
|
After Width: | Height: | Size: 96 B |
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 165 B |
BIN
src/libs/extensionsystem/images/ok@2x.png
Normal file
|
After Width: | Height: | Size: 221 B |
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/categorysortfiltermodel.h>
|
#include <utils/categorysortfiltermodel.h>
|
||||||
|
#include <utils/icon.h>
|
||||||
#include <utils/itemviews.h>
|
#include <utils/itemviews.h>
|
||||||
#include <utils/treemodel.h>
|
#include <utils/treemodel.h>
|
||||||
|
|
||||||
@@ -88,14 +89,30 @@ enum IconIndex { OkIcon, ErrorIcon, NotLoadedIcon };
|
|||||||
|
|
||||||
static const int SortRole = Qt::UserRole + 1;
|
static const int SortRole = Qt::UserRole + 1;
|
||||||
|
|
||||||
static const QIcon &icon(int num)
|
static const QIcon &icon(IconIndex icon)
|
||||||
{
|
{
|
||||||
static QIcon icons[] = {
|
using namespace Utils;
|
||||||
QIcon(QLatin1String(":/extensionsystem/images/ok.png")),
|
switch (icon) {
|
||||||
QIcon(QLatin1String(":/extensionsystem/images/error.png")),
|
case OkIcon: {
|
||||||
QIcon(QLatin1String(":/extensionsystem/images/notloaded.png")),
|
static const QIcon ok =
|
||||||
};
|
Icon({{QLatin1String(":/extensionsystem/images/ok.png"),
|
||||||
return icons[num];
|
Theme::IconsRunColor}}, Icon::Style::Tinted).icon();
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
case ErrorIcon: {
|
||||||
|
static const QIcon error =
|
||||||
|
Icon({{QLatin1String(":/extensionsystem/images/error.png"),
|
||||||
|
Theme::IconsErrorColor}}, Icon::Style::Tinted).icon();
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
case NotLoadedIcon: {
|
||||||
|
static const QIcon notLoaded =
|
||||||
|
Icon({{QLatin1String(":/extensionsystem/images/notloaded.png"),
|
||||||
|
Theme::IconsErrorColor}}, Icon::Style::Tinted).icon();
|
||||||
|
return notLoaded;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PluginItem : public TreeItem
|
class PluginItem : public TreeItem
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/extensionsystem">
|
<qresource prefix="/extensionsystem">
|
||||||
<file>images/ok.png</file>
|
<file>images/ok.png</file>
|
||||||
|
<file>images/ok@2x.png</file>
|
||||||
<file>images/error.png</file>
|
<file>images/error.png</file>
|
||||||
|
<file>images/error@2x.png</file>
|
||||||
<file>images/notloaded.png</file>
|
<file>images/notloaded.png</file>
|
||||||
|
<file>images/notloaded@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -1509,6 +1509,66 @@
|
|||||||
d="m 322.76517,465.96966 -17.45581,2.61872 5.9902,-17.11022"
|
d="m 322.76517,465.96966 -17.45581,2.61872 5.9902,-17.11022"
|
||||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
</g>
|
</g>
|
||||||
|
<g
|
||||||
|
id="src/libs/extensionsystem/images/ok">
|
||||||
|
<rect
|
||||||
|
y="584"
|
||||||
|
x="297"
|
||||||
|
height="16"
|
||||||
|
width="16"
|
||||||
|
id="rect4785"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4775"
|
||||||
|
d="m 301,592 2.5,2.49989 L 309,589"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="src/libs/extensionsystem/images/error"
|
||||||
|
transform="translate(2,0)">
|
||||||
|
<rect
|
||||||
|
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect4785-2"
|
||||||
|
width="16"
|
||||||
|
height="16"
|
||||||
|
x="311"
|
||||||
|
y="584" />
|
||||||
|
<g
|
||||||
|
id="g4845"
|
||||||
|
transform="translate(2.9995534,-2.9995534)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 312.50045,598.49955 7,-7"
|
||||||
|
id="path4777"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 312.50045,591.49955 7,7"
|
||||||
|
id="path4779"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="src/libs/extensionsystem/images/notloaded"
|
||||||
|
transform="translate(8,0)">
|
||||||
|
<rect
|
||||||
|
y="584"
|
||||||
|
x="321"
|
||||||
|
height="16"
|
||||||
|
width="16"
|
||||||
|
id="rect4785-2-9"
|
||||||
|
style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4781"
|
||||||
|
d="m 325,592 8,0"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
</g>
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
inkscape:groupmode="layer"
|
inkscape:groupmode="layer"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 116 KiB |