diff --git a/RedPandaIDE/icons.qrc b/RedPandaIDE/icons.qrc
index e686bf63..2143c062 100644
--- a/RedPandaIDE/icons.qrc
+++ b/RedPandaIDE/icons.qrc
@@ -450,10 +450,6 @@
images/newlook64/087-update.png
images/newlook64/088-watch.png
images/newlook64/089-watch-tm.png
- images/editor/breakpoint.png
- images/editor/currentline.png
- images/editor/syntaxerror.png
- images/editor/syntaxwarning.png
images/associations/c.ico
images/associations/cpp.ico
images/associations/dev.ico
@@ -486,10 +482,13 @@
images/classparser/var_private.ico
images/classparser/var_protected.ico
images/classparser/var_public.ico
- images/editor/bookmark.png
images/newlook24/091-openproblemanswer.png
images/newlook24/092-runallproblemcases.png
images/newlook24/093-pause.png
images/editor/breakpoint.svg
+ images/editor/bookmark.svg
+ images/editor/currentline.svg
+ images/editor/syntaxerror.svg
+ images/editor/syntaxwarning.svg
diff --git a/RedPandaIDE/iconsmanager.cpp b/RedPandaIDE/iconsmanager.cpp
index 374f5457..45d92281 100644
--- a/RedPandaIDE/iconsmanager.cpp
+++ b/RedPandaIDE/iconsmanager.cpp
@@ -7,23 +7,18 @@ IconsManager* pIconsManager;
IconsManager::IconsManager(QObject *parent) : QObject(parent)
{
- updateIcons(24);
+ updateEditorGuttorIcons(24);
+ mFolder = std::make_shared(":/icons/images/newlook24/090-explorer.png");
}
-void IconsManager::updateIcons(int size)
+void IconsManager::updateEditorGuttorIcons(int size)
{
- QSvgRenderer renderer(QString(":/icons/images/editor/breakpoint.svg"));
- mBreakpoint = std::make_shared(size,size);
- mBreakpoint->fill(Qt::transparent);
- QPainter painter(mBreakpoint.get());
- renderer.render(&painter,mBreakpoint->rect());
-
- mSyntaxError = std::make_shared(":/icons/images/editor/syntaxerror.png");
- mSyntaxWarning = std::make_shared(":/icons/images/editor/syntaxwarning.png");
- mActiveBreakpoint = std::make_shared(":/icons/images/editor/currentline.png");
- mBookmark = std::make_shared(":/icons/images/editor/bookmark.png");
- mFolder = std::make_shared(":/icons/images/newlook24/090-explorer.png");
+ mBreakpoint = createSVGIcon(":/icons/images/editor/breakpoint.svg",size,size);
+ mSyntaxError = createSVGIcon(":/icons/images/editor/syntaxerror.svg",size,size);
+ mSyntaxWarning = createSVGIcon(":/icons/images/editor/syntaxwarning.svg",size,size);
+ mActiveBreakpoint = createSVGIcon(":/icons/images/editor/currentline.svg",size,size);
+ mBookmark = createSVGIcon(":/icons/images/editor/bookmark.svg",size,size);
}
const PIcon &IconsManager::syntaxError() const
@@ -55,3 +50,13 @@ const PIcon &IconsManager::folder() const
{
return mFolder;
}
+
+PIcon IconsManager::createSVGIcon(const QString &filename, int width, int height)
+{
+ QSvgRenderer renderer(filename);
+ PIcon icon = std::make_shared(width,height);
+ icon->fill(Qt::transparent);
+ QPainter painter(icon.get());
+ renderer.render(&painter,icon->rect());
+ return icon;
+}
diff --git a/RedPandaIDE/iconsmanager.h b/RedPandaIDE/iconsmanager.h
index 5f3d87ab..2eb74544 100644
--- a/RedPandaIDE/iconsmanager.h
+++ b/RedPandaIDE/iconsmanager.h
@@ -12,7 +12,7 @@ class IconsManager : public QObject
public:
explicit IconsManager(QObject *parent = nullptr);
- void updateIcons(int size);
+ void updateEditorGuttorIcons(int size);
const PIcon &syntaxError() const;
@@ -25,6 +25,8 @@ public:
const PIcon &bookmark() const;
const PIcon &folder() const;
+
+ PIcon createSVGIcon(const QString& filename, int width, int height);
private:
PIcon mSyntaxError;
PIcon mSyntaxWarning;
diff --git a/RedPandaIDE/images/editor/bookmark.png b/RedPandaIDE/images/editor/bookmark.png
deleted file mode 100644
index 066ace31..00000000
Binary files a/RedPandaIDE/images/editor/bookmark.png and /dev/null differ
diff --git a/RedPandaIDE/images/editor/bookmark.svg b/RedPandaIDE/images/editor/bookmark.svg
new file mode 100644
index 00000000..c66f8c02
--- /dev/null
+++ b/RedPandaIDE/images/editor/bookmark.svg
@@ -0,0 +1,47 @@
+
+
+
+
diff --git a/RedPandaIDE/images/editor/breakpoint.png b/RedPandaIDE/images/editor/breakpoint.png
deleted file mode 100644
index 968cbb40..00000000
Binary files a/RedPandaIDE/images/editor/breakpoint.png and /dev/null differ
diff --git a/RedPandaIDE/images/editor/currentline.png b/RedPandaIDE/images/editor/currentline.png
deleted file mode 100644
index b5cd253a..00000000
Binary files a/RedPandaIDE/images/editor/currentline.png and /dev/null differ
diff --git a/RedPandaIDE/images/editor/currentline.svg b/RedPandaIDE/images/editor/currentline.svg
new file mode 100644
index 00000000..e6b96339
--- /dev/null
+++ b/RedPandaIDE/images/editor/currentline.svg
@@ -0,0 +1,72 @@
+
+
+
+
diff --git a/RedPandaIDE/images/editor/syntaxerror.png b/RedPandaIDE/images/editor/syntaxerror.png
deleted file mode 100644
index 9d674113..00000000
Binary files a/RedPandaIDE/images/editor/syntaxerror.png and /dev/null differ
diff --git a/RedPandaIDE/images/editor/syntaxerror.svg b/RedPandaIDE/images/editor/syntaxerror.svg
new file mode 100644
index 00000000..9a98c818
--- /dev/null
+++ b/RedPandaIDE/images/editor/syntaxerror.svg
@@ -0,0 +1,58 @@
+
+
+
+
diff --git a/RedPandaIDE/images/editor/syntaxwarning.png b/RedPandaIDE/images/editor/syntaxwarning.png
deleted file mode 100644
index d8d319a6..00000000
Binary files a/RedPandaIDE/images/editor/syntaxwarning.png and /dev/null differ
diff --git a/RedPandaIDE/images/editor/syntaxwarning.svg b/RedPandaIDE/images/editor/syntaxwarning.svg
new file mode 100644
index 00000000..9800847e
--- /dev/null
+++ b/RedPandaIDE/images/editor/syntaxwarning.svg
@@ -0,0 +1,50 @@
+
+
+
+
diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp
index 91c75497..7dda72c9 100644
--- a/RedPandaIDE/mainwindow.cpp
+++ b/RedPandaIDE/mainwindow.cpp
@@ -321,7 +321,7 @@ void MainWindow::updateForEncodingInfo() {
void MainWindow::updateEditorSettings()
{
- pIconsManager->updateIcons(pointToPixel(pSettings->editor().fontSize()));
+ pIconsManager->updateEditorGuttorIcons(pointToPixel(pSettings->editor().fontSize()));
mEditorList->applySettings();
}