VcsBase: Modernize the icons

Use themable, HighDPI enabled icons for commit and diff.
Re-use an existing red cross for the removesubmitfield.

Change-Id: I43f46db96d07de9a7e166937d470d48e45d7f3fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2017-10-06 17:58:08 +02:00
parent faee18d31e
commit 9a7e1cd6c6
16 changed files with 134 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

View File

@@ -25,6 +25,8 @@
#include "submitfieldwidget.h" #include "submitfieldwidget.h"
#include <utils/utilsicons.h>
#include <QComboBox> #include <QComboBox>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
@@ -139,7 +141,7 @@ struct SubmitFieldWidgetPrivate {
}; };
SubmitFieldWidgetPrivate::SubmitFieldWidgetPrivate() : SubmitFieldWidgetPrivate::SubmitFieldWidgetPrivate() :
removeFieldIcon(QLatin1String(":/vcsbase/images/removesubmitfield.png")), removeFieldIcon(Utils::Icons::BROKEN.icon()),
completer(0), completer(0),
hasBrowseButton(false), hasBrowseButton(false),
allowDuplicateFields(false), allowDuplicateFields(false),

View File

@@ -74,9 +74,6 @@ QtcPlugin {
"vcsplugin.h", "vcsplugin.h",
"vcsprojectcache.cpp", "vcsprojectcache.cpp",
"vcsprojectcache.h", "vcsprojectcache.h",
"images/diff.png",
"images/removesubmitfield.png",
"images/submit.png",
"wizard/vcsconfigurationpage.cpp", "wizard/vcsconfigurationpage.cpp",
"wizard/vcsconfigurationpage.h", "wizard/vcsconfigurationpage.h",
"wizard/vcscommandpage.cpp", "wizard/vcscommandpage.cpp",

View File

@@ -1,8 +1,13 @@
<RCC> <RCC>
<qresource prefix="/vcsbase"> <qresource prefix="/vcsbase">
<file>images/category_vcs.png</file> <file>images/category_vcs.png</file>
<file>images/diff.png</file> <file>images/diff_arrows.png</file>
<file>images/removesubmitfield.png</file> <file>images/diff_arrows@2x.png</file>
<file>images/submit.png</file> <file>images/diff_documents.png</file>
<file>images/diff_documents@2x.png</file>
<file>images/submit_arrow.png</file>
<file>images/submit_arrow@2x.png</file>
<file>images/submit_db.png</file>
<file>images/submit_db@2x.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -43,6 +43,8 @@
#include <utils/completingtextedit.h> #include <utils/completingtextedit.h>
#include <utils/synchronousprocess.h> #include <utils/synchronousprocess.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/icon.h>
#include <utils/theme/theme.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/temporarydirectory.h> #include <utils/temporarydirectory.h>
#include <coreplugin/find/basetextfind.h> #include <coreplugin/find/basetextfind.h>
@@ -715,12 +717,20 @@ bool VcsBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript
QIcon VcsBaseSubmitEditor::diffIcon() QIcon VcsBaseSubmitEditor::diffIcon()
{ {
return QIcon(QLatin1String(":/vcsbase/images/diff.png")); using namespace Utils;
return Icon({
{":/vcsbase/images/diff_documents.png", Theme::PanelTextColorDark},
{":/vcsbase/images/diff_arrows.png", Theme::IconsStopColor}
}, Icon::Tint).icon();
} }
QIcon VcsBaseSubmitEditor::submitIcon() QIcon VcsBaseSubmitEditor::submitIcon()
{ {
return QIcon(QLatin1String(":/vcsbase/images/submit.png")); using namespace Utils;
return Icon({
{":/vcsbase/images/submit_db.png", Theme::PanelTextColorDark},
{":/vcsbase/images/submit_arrow.png", Theme::IconsRunColor}
}, Icon::Tint | Icon::PunchEdges).icon();
} }
// Reduce a list of untracked files reported by a VCS down to the files // Reduce a list of untracked files reported by a VCS down to the files

View File

@@ -8754,4 +8754,115 @@
x="0" /> x="0" />
</g> </g>
</g> </g>
<g
id="src/plugins/vcsbase/images/submit_arrow">
<use
transform="translate(1740,132)"
height="100%"
width="100%"
id="use1502"
xlink:href="#backgroundRect"
y="0"
x="0" />
<g
transform="rotate(90,1058.75,927.6465)"
id="g7250-8"
style="fill:#000000">
<path
id="rect6594-4-1"
style="fill:#000000"
d="m 707.10352,255.3965 h 2 v 6 h -2 z m 1,0.5 -3,3 v -2 l 3,-3 3,3 v 2 z"
inkscape:connector-curvature="0" />
</g>
</g>
<g
id="src/plugins/vcsbase/images/submit_db"
transform="translate(16)">
<use
x="0"
y="0"
xlink:href="#backgroundRect"
id="use6087"
width="100%"
height="100%"
transform="translate(1740,132)" />
<path
sodipodi:nodetypes="cccscc"
inkscape:connector-curvature="0"
d="m 1738.5,573 v 6 0 c 0,1.38071 -1.7909,2.5 -4,2.5 -2.2091,0 -4,-1.11929 -4,-2.5 v -6"
style="fill:#cccccc;stroke:#000000"
id="path6089" />
<ellipse
style="fill:#b3b3b3;stroke:#000000"
id="ellipse6091"
cx="1734.5"
cy="573"
rx="4"
ry="2.5" />
</g>
<g
transform="translate(32)"
id="src/plugins/vcsbase/images/diff_documents">
<use
transform="translate(1740,132)"
height="100%"
width="100%"
id="use1502-0"
xlink:href="#backgroundRect"
y="0"
x="0" />
<use
x="0"
y="0"
xlink:href="#unknowndocumentsheet"
id="use6143"
transform="translate(1567,48)"
width="100%"
height="100%" />
<use
x="0"
y="0"
xlink:href="#unknowndocumentsheet"
id="use6143-0"
transform="translate(1559,42)"
width="100%"
height="100%" />
</g>
<g
transform="translate(48)"
id="src/plugins/vcsbase/images/diff_arrows">
<use
transform="translate(1740,132)"
height="100%"
width="100%"
id="use1502-0-5"
xlink:href="#backgroundRect"
y="0"
x="0" />
<g
style="display:inline"
id="debugger_step_arrow-8-7"
transform="rotate(-180,1122.5,574)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4755-3-1"
d="m 514,578.5 c -5.5,0 -5.5,0 -5.5678,-4.41145"
style="fill:none;stroke:#000000;stroke-width:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4757-6-9"
d="m 505.4947,576 3,-3 3,3 z"
style="fill:#000000;fill-opacity:1" />
</g>
<use
x="0"
y="0"
xlink:href="#debugger_step_arrow-8-7"
id="use6195-2"
width="100%"
height="100%"
transform="rotate(180,1732.0027,576.00257)" />
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 316 KiB