TextEditor: Highpi-able and themable refactor marker

Change-Id: I1866e4c5eba7b1afd60e2c461644cbfd6b7efd75
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Alessandro Portale
2016-10-11 01:04:14 +02:00
parent 22d40f4dc6
commit d10d0f73e9
8 changed files with 45 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -27,6 +27,8 @@
#include "textdocumentlayout.h"
#include "texteditor.h"
#include <utils/icon.h>
#include <QPainter>
#include <QDebug>
@@ -37,7 +39,9 @@ RefactorOverlay::RefactorOverlay(TextEditor::TextEditorWidget *editor) :
QObject(editor),
m_editor(editor),
m_maxWidth(0),
m_icon(QLatin1String(":/texteditor/images/refactormarker.png"))
m_icon(Utils::Icon({
{QLatin1String(":/texteditor/images/lightbulbcap.png"), Utils::Theme::PanelTextColorMid},
{QLatin1String(":/texteditor/images/lightbulb.png"), Utils::Theme::IconsWarningColor}}, Utils::Icon::Tint).icon())
{
}

View File

@@ -2,7 +2,10 @@
<qresource prefix="/texteditor">
<file>images/finddocuments.png</file>
<file>images/finddirectory.png</file>
<file>images/refactormarker.png</file>
<file>images/lightbulb.png</file>
<file>images/lightbulb@2x.png</file>
<file>images/lightbulbcap.png</file>
<file>images/lightbulbcap@2x.png</file>
<file>images/snippet.png</file>
</qresource>
</RCC>

View File

@@ -3360,6 +3360,42 @@
style="fill:#000000"
id="rect5132-95" />
</g>
<g
style="display:inline"
id="src/plugins/texteditor/images/lightbulbcap"
transform="translate(28,2)">
<rect
style="fill:#ffffff"
x="1180"
y="571"
width="10"
height="11"
id="rect6782-96-0-0-7-8-1-0-4-4" />
<path
style="fill:#000000"
d="m 1183,578.3334 0,0.6666 0.5,0 0,1 -0.5,0 0,1 1,0 0.5,1 1,0 0.5,-1 1,0 0,-1 -0.5,0 0,-1 0.5,0 0,-0.6666 z"
id="path4355"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccc" />
</g>
<g
style="display:inline"
id="src/plugins/texteditor/images/lightbulb"
transform="translate(38,2)">
<rect
style="fill:#ffffff"
x="1180"
y="571"
width="10"
height="11"
id="rect6782-96-0-0-7-8-1-0-4-4-9" />
<path
style="fill:#000000"
d="m 1183,578 c 0,0 0,0.17678 -1.5,-2.32322 -1.5,-2.5 0.5,-4.67678 3.5,-4.67678 3,0 5,2.17678 3.5,4.67678 -1.5,2.5 -1.5,2.32322 -1.5,2.32322 z"
id="path4349-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="czzzcc" />
</g>
</g>
<g
inkscape:groupmode="layer"

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 212 KiB