From 3cc41fdb9ab708e8e78fc68c65a8e7261431b203 Mon Sep 17 00:00:00 2001 From: shun_iwasawa Date: Aug 22 2017 10:38:27 +0000 Subject: konero svg icons cont'd --- diff --git a/toonz/sources/include/toonzqt/glwidget_for_highdpi.h b/toonz/sources/include/toonzqt/glwidget_for_highdpi.h index 2bae136..e671798 100644 --- a/toonz/sources/include/toonzqt/glwidget_for_highdpi.h +++ b/toonz/sources/include/toonzqt/glwidget_for_highdpi.h @@ -6,6 +6,7 @@ #include #include #include +#include "toonzqt/gutil.h" // use obsolete QGLWidget instead of QOpenGLWidget for now... // TODO: replace with the "modern" OpenGL source and transfer to QOpenGLWidget @@ -16,13 +17,6 @@ public: Qt::WindowFlags f = Qt::WindowFlags()) : QGLWidget(parent, shareWidget, f) {} - // returns device-pixel ratio. It is 1 for normal monitors and 2 (or higher - // ratio) for high DPI monitors. Setting "Display > Set custom text size(DPI)" - // for Windows corresponds to this ratio. - int getDevPixRatio() const { - static int devPixRatio = QApplication::desktop()->devicePixelRatio(); - return devPixRatio; - } // modify sizes for high DPI monitors int width() const { return QGLWidget::width() * getDevPixRatio(); } int height() const { return QGLWidget::height() * getDevPixRatio(); } diff --git a/toonz/sources/include/toonzqt/gutil.h b/toonz/sources/include/toonzqt/gutil.h index c317333..4dd4ce7 100644 --- a/toonz/sources/include/toonzqt/gutil.h +++ b/toonz/sources/include/toonzqt/gutil.h @@ -57,7 +57,8 @@ QImage DVAPI rasterToQImage(const TRasterP &ras, bool premultiplied = true, //----------------------------------------------------------------------------- -QPixmap DVAPI rasterToQPixmap(const TRaster32P &ras, bool premultiplied = true); +QPixmap DVAPI rasterToQPixmap(const TRaster32P &ras, bool premultiplied = true, + bool setDevPixRatio = false); //----------------------------------------------------------------------------- @@ -88,6 +89,19 @@ QPixmap DVAPI scalePixmapKeepingAspectRatio(QPixmap p, QSize size, QColor color = Qt::white); //----------------------------------------------------------------------------- + +QPixmap DVAPI +svgToPixmap(const QString &svgFilePath, const QSize &size = QSize(), + Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, + QColor bgColor = Qt::transparent); + +//----------------------------------------------------------------------------- +// returns device-pixel ratio. It is 1 for normal monitors and 2 (or higher +// ratio) for high DPI monitors. Setting "Display > Set custom text size(DPI)" +// for Windows corresponds to this ratio. +int DVAPI getDevPixRatio(); + +//----------------------------------------------------------------------------- QIcon DVAPI createQIcon(const char *iconSVGName); QIcon DVAPI createQIconPNG(const char *iconPNGName); QIcon DVAPI createQIconOnOff(const char *iconSVGName, bool withOver = true); diff --git a/toonz/sources/toonz/Resources/3Dside_l.png b/toonz/sources/toonz/Resources/3Dside_l.png deleted file mode 100644 index 58e2f5a..0000000 Binary files a/toonz/sources/toonz/Resources/3Dside_l.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/3Dside_l.svg b/toonz/sources/toonz/Resources/3Dside_l.svg new file mode 100644 index 0000000..fefb202 --- /dev/null +++ b/toonz/sources/toonz/Resources/3Dside_l.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/toonz/sources/toonz/Resources/3Dside_r.png b/toonz/sources/toonz/Resources/3Dside_r.png deleted file mode 100644 index f9c9214..0000000 Binary files a/toonz/sources/toonz/Resources/3Dside_r.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/3Dside_r.svg b/toonz/sources/toonz/Resources/3Dside_r.svg new file mode 100644 index 0000000..cad3165 --- /dev/null +++ b/toonz/sources/toonz/Resources/3Dside_r.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/3Dtop.png b/toonz/sources/toonz/Resources/3Dtop.png deleted file mode 100644 index c3feec1..0000000 Binary files a/toonz/sources/toonz/Resources/3Dtop.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/3Dtop.svg b/toonz/sources/toonz/Resources/3Dtop.svg new file mode 100644 index 0000000..f37f799 --- /dev/null +++ b/toonz/sources/toonz/Resources/3Dtop.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/toonz/sources/toonz/Resources/audio.png b/toonz/sources/toonz/Resources/audio.png deleted file mode 100644 index e46cad6..0000000 Binary files a/toonz/sources/toonz/Resources/audio.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/broken.png b/toonz/sources/toonz/Resources/broken.png deleted file mode 100644 index 8f0ff7d..0000000 Binary files a/toonz/sources/toonz/Resources/broken.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/broken.svg b/toonz/sources/toonz/Resources/broken.svg new file mode 100644 index 0000000..a5be0d9 --- /dev/null +++ b/toonz/sources/toonz/Resources/broken.svg @@ -0,0 +1,15 @@ + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_folder_close.png b/toonz/sources/toonz/Resources/browser_folder_close.png deleted file mode 100644 index b93c542..0000000 Binary files a/toonz/sources/toonz/Resources/browser_folder_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_folder_close.svg b/toonz/sources/toonz/Resources/browser_folder_close.svg new file mode 100644 index 0000000..46257e3 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_folder_close.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_folder_open.png b/toonz/sources/toonz/Resources/browser_folder_open.png deleted file mode 100644 index 93214c9..0000000 Binary files a/toonz/sources/toonz/Resources/browser_folder_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_folder_open.svg b/toonz/sources/toonz/Resources/browser_folder_open.svg new file mode 100644 index 0000000..789c062 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_folder_open.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_project_close.png b/toonz/sources/toonz/Resources/browser_project_close.png deleted file mode 100644 index 6cbc21e..0000000 Binary files a/toonz/sources/toonz/Resources/browser_project_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_project_close.svg b/toonz/sources/toonz/Resources/browser_project_close.svg new file mode 100644 index 0000000..3238325 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_project_close.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_project_open.png b/toonz/sources/toonz/Resources/browser_project_open.png deleted file mode 100644 index fdd469f..0000000 Binary files a/toonz/sources/toonz/Resources/browser_project_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_project_open.svg b/toonz/sources/toonz/Resources/browser_project_open.svg new file mode 100644 index 0000000..7a7974e --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_project_open.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_scene_close.png b/toonz/sources/toonz/Resources/browser_scene_close.png deleted file mode 100644 index 20bbe95..0000000 Binary files a/toonz/sources/toonz/Resources/browser_scene_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_scene_close.svg b/toonz/sources/toonz/Resources/browser_scene_close.svg new file mode 100644 index 0000000..7e29c6d --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_scene_close.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_scene_open.png b/toonz/sources/toonz/Resources/browser_scene_open.png deleted file mode 100644 index 15f01e4..0000000 Binary files a/toonz/sources/toonz/Resources/browser_scene_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_scene_open.svg b/toonz/sources/toonz/Resources/browser_scene_open.svg new file mode 100644 index 0000000..6f41e27 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_scene_open.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_vcproject_close.png b/toonz/sources/toonz/Resources/browser_vcproject_close.png deleted file mode 100644 index 8461598..0000000 Binary files a/toonz/sources/toonz/Resources/browser_vcproject_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_vcproject_close.svg b/toonz/sources/toonz/Resources/browser_vcproject_close.svg new file mode 100644 index 0000000..56dccd0 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_vcproject_close.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/browser_vcproject_open.png b/toonz/sources/toonz/Resources/browser_vcproject_open.png deleted file mode 100644 index 1e125d5..0000000 Binary files a/toonz/sources/toonz/Resources/browser_vcproject_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/browser_vcproject_open.svg b/toonz/sources/toonz/Resources/browser_vcproject_open.svg new file mode 100644 index 0000000..663a7a7 --- /dev/null +++ b/toonz/sources/toonz/Resources/browser_vcproject_open.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/close_pane.png b/toonz/sources/toonz/Resources/close_pane.png deleted file mode 100644 index 558723b..0000000 Binary files a/toonz/sources/toonz/Resources/close_pane.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/close_pane.svg b/toonz/sources/toonz/Resources/close_pane.svg index 8b8445b..7c5bb86 100644 --- a/toonz/sources/toonz/Resources/close_pane.svg +++ b/toonz/sources/toonz/Resources/close_pane.svg @@ -1,59 +1,37 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/close_pane_rollover.png b/toonz/sources/toonz/Resources/close_pane_rollover.png deleted file mode 100644 index 1c11e06..0000000 Binary files a/toonz/sources/toonz/Resources/close_pane_rollover.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/close_pane_rollover.svg b/toonz/sources/toonz/Resources/close_pane_rollover.svg index 6357200..8b5a793 100644 --- a/toonz/sources/toonz/Resources/close_pane_rollover.svg +++ b/toonz/sources/toonz/Resources/close_pane_rollover.svg @@ -1,62 +1,39 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/closedfolder.png b/toonz/sources/toonz/Resources/closedfolder.png deleted file mode 100644 index 9a46352..0000000 Binary files a/toonz/sources/toonz/Resources/closedfolder.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/curve.png b/toonz/sources/toonz/Resources/curve.png deleted file mode 100644 index 92579b7..0000000 Binary files a/toonz/sources/toonz/Resources/curve.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/curve.svg b/toonz/sources/toonz/Resources/curve.svg new file mode 100644 index 0000000..3703fa8 --- /dev/null +++ b/toonz/sources/toonz/Resources/curve.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/desktop.png b/toonz/sources/toonz/Resources/desktop.png deleted file mode 100644 index 61cba31..0000000 Binary files a/toonz/sources/toonz/Resources/desktop.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/desktop.svg b/toonz/sources/toonz/Resources/desktop.svg new file mode 100644 index 0000000..6748e61 --- /dev/null +++ b/toonz/sources/toonz/Resources/desktop.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/filmstrip_inbetween.png b/toonz/sources/toonz/Resources/filmstrip_inbetween.png deleted file mode 100644 index be6c8ec..0000000 Binary files a/toonz/sources/toonz/Resources/filmstrip_inbetween.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/filmstrip_inbetween.svg b/toonz/sources/toonz/Resources/filmstrip_inbetween.svg new file mode 100644 index 0000000..a83303d --- /dev/null +++ b/toonz/sources/toonz/Resources/filmstrip_inbetween.svg @@ -0,0 +1,15 @@ + + + + + + + diff --git a/toonz/sources/toonz/Resources/folder_icon.png b/toonz/sources/toonz/Resources/folder_icon.png deleted file mode 100644 index 005ccaf..0000000 Binary files a/toonz/sources/toonz/Resources/folder_icon.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folder_icon.svg b/toonz/sources/toonz/Resources/folder_icon.svg new file mode 100644 index 0000000..86b0475 --- /dev/null +++ b/toonz/sources/toonz/Resources/folder_icon.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/folder_new.png b/toonz/sources/toonz/Resources/folder_new.png deleted file mode 100644 index 146571b..0000000 Binary files a/toonz/sources/toonz/Resources/folder_new.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folder_new_click.png b/toonz/sources/toonz/Resources/folder_new_click.png deleted file mode 100644 index 3370029..0000000 Binary files a/toonz/sources/toonz/Resources/folder_new_click.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folder_new_over.png b/toonz/sources/toonz/Resources/folder_new_over.png deleted file mode 100644 index 77b356c..0000000 Binary files a/toonz/sources/toonz/Resources/folder_new_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folderpreset_close.png b/toonz/sources/toonz/Resources/folderpreset_close.png deleted file mode 100644 index caa889d..0000000 Binary files a/toonz/sources/toonz/Resources/folderpreset_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folderpreset_close.svg b/toonz/sources/toonz/Resources/folderpreset_close.svg new file mode 100644 index 0000000..098aa20 --- /dev/null +++ b/toonz/sources/toonz/Resources/folderpreset_close.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/folderpreset_open.png b/toonz/sources/toonz/Resources/folderpreset_open.png deleted file mode 100644 index e583433..0000000 Binary files a/toonz/sources/toonz/Resources/folderpreset_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folderpreset_open.svg b/toonz/sources/toonz/Resources/folderpreset_open.svg new file mode 100644 index 0000000..2552b5f --- /dev/null +++ b/toonz/sources/toonz/Resources/folderpreset_open.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/folderup_icon.png b/toonz/sources/toonz/Resources/folderup_icon.png deleted file mode 100644 index e12db79..0000000 Binary files a/toonz/sources/toonz/Resources/folderup_icon.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/folderup_icon.svg b/toonz/sources/toonz/Resources/folderup_icon.svg new file mode 100644 index 0000000..693836b --- /dev/null +++ b/toonz/sources/toonz/Resources/folderup_icon.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/functoggle00.png b/toonz/sources/toonz/Resources/functoggle00.png deleted file mode 100644 index 2b16623..0000000 Binary files a/toonz/sources/toonz/Resources/functoggle00.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/functoggle10.png b/toonz/sources/toonz/Resources/functoggle10.png deleted file mode 100644 index f829e00..0000000 Binary files a/toonz/sources/toonz/Resources/functoggle10.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/functoggle11.png b/toonz/sources/toonz/Resources/functoggle11.png deleted file mode 100644 index 5dc4a03..0000000 Binary files a/toonz/sources/toonz/Resources/functoggle11.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/fx.png b/toonz/sources/toonz/Resources/fx.png deleted file mode 100644 index fa1fb39..0000000 Binary files a/toonz/sources/toonz/Resources/fx.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/fx.svg b/toonz/sources/toonz/Resources/fx.svg new file mode 100644 index 0000000..e1f9f05 --- /dev/null +++ b/toonz/sources/toonz/Resources/fx.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/histograms.png b/toonz/sources/toonz/Resources/histograms.png deleted file mode 100644 index f9c1de8..0000000 Binary files a/toonz/sources/toonz/Resources/histograms.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/histograms_click.png b/toonz/sources/toonz/Resources/histograms_click.png deleted file mode 100644 index f9c1de8..0000000 Binary files a/toonz/sources/toonz/Resources/histograms_click.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/histograms_over.png b/toonz/sources/toonz/Resources/histograms_over.png deleted file mode 100644 index 416896b..0000000 Binary files a/toonz/sources/toonz/Resources/histograms_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/history.png b/toonz/sources/toonz/Resources/history.png deleted file mode 100644 index 67a5b03..0000000 Binary files a/toonz/sources/toonz/Resources/history.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/history.svg b/toonz/sources/toonz/Resources/history.svg new file mode 100644 index 0000000..bad4eea --- /dev/null +++ b/toonz/sources/toonz/Resources/history.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/key.bmp b/toonz/sources/toonz/Resources/key.bmp deleted file mode 100644 index 7a4ee89..0000000 Binary files a/toonz/sources/toonz/Resources/key.bmp and /dev/null differ diff --git a/toonz/sources/toonz/Resources/key.svg b/toonz/sources/toonz/Resources/key.svg new file mode 100644 index 0000000..c3e484d --- /dev/null +++ b/toonz/sources/toonz/Resources/key.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/key_click.png b/toonz/sources/toonz/Resources/key_click.png deleted file mode 100644 index 1d9dc43..0000000 Binary files a/toonz/sources/toonz/Resources/key_click.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/key_click.svg b/toonz/sources/toonz/Resources/key_click.svg deleted file mode 100644 index 7339828..0000000 --- a/toonz/sources/toonz/Resources/key_click.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/key_off.png b/toonz/sources/toonz/Resources/key_off.png deleted file mode 100644 index d355639..0000000 Binary files a/toonz/sources/toonz/Resources/key_off.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/key_off.svg b/toonz/sources/toonz/Resources/key_off.svg deleted file mode 100644 index 9ce053d..0000000 --- a/toonz/sources/toonz/Resources/key_off.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/key_on.png b/toonz/sources/toonz/Resources/key_on.png deleted file mode 100644 index d1d569f..0000000 Binary files a/toonz/sources/toonz/Resources/key_on.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/key_on.svg b/toonz/sources/toonz/Resources/key_on.svg deleted file mode 100644 index 448bdd4..0000000 --- a/toonz/sources/toonz/Resources/key_on.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keynext.png b/toonz/sources/toonz/Resources/keynext.png deleted file mode 100644 index 507d440..0000000 Binary files a/toonz/sources/toonz/Resources/keynext.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keynext.svg b/toonz/sources/toonz/Resources/keynext.svg deleted file mode 100644 index fed0768..0000000 --- a/toonz/sources/toonz/Resources/keynext.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keynext_dim.png b/toonz/sources/toonz/Resources/keynext_dim.png deleted file mode 100644 index 8eabf77..0000000 Binary files a/toonz/sources/toonz/Resources/keynext_dim.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keynext_dim.svg b/toonz/sources/toonz/Resources/keynext_dim.svg deleted file mode 100644 index 1c0953c..0000000 --- a/toonz/sources/toonz/Resources/keynext_dim.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keynext_over.png b/toonz/sources/toonz/Resources/keynext_over.png deleted file mode 100644 index 1f073bc..0000000 Binary files a/toonz/sources/toonz/Resources/keynext_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keynext_over.svg b/toonz/sources/toonz/Resources/keynext_over.svg deleted file mode 100644 index 0e18b34..0000000 --- a/toonz/sources/toonz/Resources/keynext_over.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keyprev.png b/toonz/sources/toonz/Resources/keyprev.png deleted file mode 100644 index c6dfc63..0000000 Binary files a/toonz/sources/toonz/Resources/keyprev.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keyprev.svg b/toonz/sources/toonz/Resources/keyprev.svg deleted file mode 100644 index c49b1d1..0000000 --- a/toonz/sources/toonz/Resources/keyprev.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keyprev_dim.png b/toonz/sources/toonz/Resources/keyprev_dim.png deleted file mode 100644 index e2b0b7e..0000000 Binary files a/toonz/sources/toonz/Resources/keyprev_dim.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keyprev_dim.svg b/toonz/sources/toonz/Resources/keyprev_dim.svg deleted file mode 100644 index 214d78b..0000000 --- a/toonz/sources/toonz/Resources/keyprev_dim.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/keyprev_over.png b/toonz/sources/toonz/Resources/keyprev_over.png deleted file mode 100644 index d9f3d5c..0000000 Binary files a/toonz/sources/toonz/Resources/keyprev_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/keyprev_over.svg b/toonz/sources/toonz/Resources/keyprev_over.svg deleted file mode 100644 index 27c5fac..0000000 --- a/toonz/sources/toonz/Resources/keyprev_over.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/library.png b/toonz/sources/toonz/Resources/library.png deleted file mode 100644 index 44a5833..0000000 Binary files a/toonz/sources/toonz/Resources/library.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/library.svg b/toonz/sources/toonz/Resources/library.svg new file mode 100644 index 0000000..41f58ce --- /dev/null +++ b/toonz/sources/toonz/Resources/library.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/link_icon.png b/toonz/sources/toonz/Resources/link_icon.png deleted file mode 100644 index 77299b2..0000000 Binary files a/toonz/sources/toonz/Resources/link_icon.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/link_icon.svg b/toonz/sources/toonz/Resources/link_icon.svg new file mode 100644 index 0000000..f67b29e --- /dev/null +++ b/toonz/sources/toonz/Resources/link_icon.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/motionpath.png b/toonz/sources/toonz/Resources/motionpath.png deleted file mode 100644 index ce7ff99..0000000 Binary files a/toonz/sources/toonz/Resources/motionpath.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/motionpath_fileicon.svg b/toonz/sources/toonz/Resources/motionpath_fileicon.svg new file mode 100644 index 0000000..5b3f186 --- /dev/null +++ b/toonz/sources/toonz/Resources/motionpath_fileicon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/my_computer.png b/toonz/sources/toonz/Resources/my_computer.png deleted file mode 100644 index 20bc648..0000000 Binary files a/toonz/sources/toonz/Resources/my_computer.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/my_computer.svg b/toonz/sources/toonz/Resources/my_computer.svg new file mode 100644 index 0000000..93e3d33 --- /dev/null +++ b/toonz/sources/toonz/Resources/my_computer.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/toonz/sources/toonz/Resources/my_documents.png b/toonz/sources/toonz/Resources/my_documents.png deleted file mode 100644 index 7c3bf04..0000000 Binary files a/toonz/sources/toonz/Resources/my_documents.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/my_documents.svg b/toonz/sources/toonz/Resources/my_documents.svg new file mode 100644 index 0000000..c6f5f4f --- /dev/null +++ b/toonz/sources/toonz/Resources/my_documents.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/network.png b/toonz/sources/toonz/Resources/network.png deleted file mode 100644 index 2b0a141..0000000 Binary files a/toonz/sources/toonz/Resources/network.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/network.svg b/toonz/sources/toonz/Resources/network.svg new file mode 100644 index 0000000..642f716 --- /dev/null +++ b/toonz/sources/toonz/Resources/network.svg @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/toonz/sources/toonz/Resources/nextkey.png b/toonz/sources/toonz/Resources/nextkey.png deleted file mode 100644 index 1f667f2..0000000 Binary files a/toonz/sources/toonz/Resources/nextkey.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/nextkey_disabled.png b/toonz/sources/toonz/Resources/nextkey_disabled.png deleted file mode 100644 index ce8ccb4..0000000 Binary files a/toonz/sources/toonz/Resources/nextkey_disabled.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/nextkey_over.png b/toonz/sources/toonz/Resources/nextkey_over.png deleted file mode 100644 index 49b0621..0000000 Binary files a/toonz/sources/toonz/Resources/nextkey_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/openedfolder.png b/toonz/sources/toonz/Resources/openedfolder.png deleted file mode 100644 index ec7df4f..0000000 Binary files a/toonz/sources/toonz/Resources/openedfolder.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/options.png b/toonz/sources/toonz/Resources/options.png deleted file mode 100644 index 2782078..0000000 Binary files a/toonz/sources/toonz/Resources/options.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/options.svg b/toonz/sources/toonz/Resources/options.svg deleted file mode 100644 index 5f37625..0000000 --- a/toonz/sources/toonz/Resources/options.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/options_click.png b/toonz/sources/toonz/Resources/options_click.png deleted file mode 100644 index 7a96556..0000000 Binary files a/toonz/sources/toonz/Resources/options_click.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/options_click.svg b/toonz/sources/toonz/Resources/options_click.svg deleted file mode 100644 index 7a30cce..0000000 --- a/toonz/sources/toonz/Resources/options_click.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/options_over.png b/toonz/sources/toonz/Resources/options_over.png deleted file mode 100644 index 88a1f65..0000000 Binary files a/toonz/sources/toonz/Resources/options_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/options_over.svg b/toonz/sources/toonz/Resources/options_over.svg deleted file mode 100644 index 373a9d5..0000000 --- a/toonz/sources/toonz/Resources/options_over.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - diff --git a/toonz/sources/toonz/Resources/palette_header.png b/toonz/sources/toonz/Resources/palette_header.png deleted file mode 100644 index 1847c55..0000000 Binary files a/toonz/sources/toonz/Resources/palette_header.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/palette_header.svg b/toonz/sources/toonz/Resources/palette_header.svg new file mode 100644 index 0000000..bdbcc07 --- /dev/null +++ b/toonz/sources/toonz/Resources/palette_header.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/paletteicon.png b/toonz/sources/toonz/Resources/paletteicon.png deleted file mode 100644 index 86fd003..0000000 Binary files a/toonz/sources/toonz/Resources/paletteicon.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/paletteicon.svg b/toonz/sources/toonz/Resources/paletteicon.svg new file mode 100644 index 0000000..38d570c --- /dev/null +++ b/toonz/sources/toonz/Resources/paletteicon.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/prevkey.png b/toonz/sources/toonz/Resources/prevkey.png deleted file mode 100644 index fcaaa93..0000000 Binary files a/toonz/sources/toonz/Resources/prevkey.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/prevkey_disabled.png b/toonz/sources/toonz/Resources/prevkey_disabled.png deleted file mode 100644 index d8f71be..0000000 Binary files a/toonz/sources/toonz/Resources/prevkey_disabled.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/prevkey_over.png b/toonz/sources/toonz/Resources/prevkey_over.png deleted file mode 100644 index 47a67ca..0000000 Binary files a/toonz/sources/toonz/Resources/prevkey_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/projects.png b/toonz/sources/toonz/Resources/projects.png deleted file mode 100644 index 6eab866..0000000 Binary files a/toonz/sources/toonz/Resources/projects.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/projects.svg b/toonz/sources/toonz/Resources/projects.svg new file mode 100644 index 0000000..ea604f3 --- /dev/null +++ b/toonz/sources/toonz/Resources/projects.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/psd.png b/toonz/sources/toonz/Resources/psd.png deleted file mode 100644 index 6ea7184..0000000 Binary files a/toonz/sources/toonz/Resources/psd.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/psd.svg b/toonz/sources/toonz/Resources/psd.svg new file mode 100644 index 0000000..48d6bf7 --- /dev/null +++ b/toonz/sources/toonz/Resources/psd.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/selected_key.bmp b/toonz/sources/toonz/Resources/selected_key.bmp deleted file mode 100644 index 4e29d0d..0000000 Binary files a/toonz/sources/toonz/Resources/selected_key.bmp and /dev/null differ diff --git a/toonz/sources/toonz/Resources/selected_key.svg b/toonz/sources/toonz/Resources/selected_key.svg new file mode 100644 index 0000000..b72a541 --- /dev/null +++ b/toonz/sources/toonz/Resources/selected_key.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/sound_header_off.png b/toonz/sources/toonz/Resources/sound_header_off.png deleted file mode 100644 index 541cc0f..0000000 Binary files a/toonz/sources/toonz/Resources/sound_header_off.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/sound_header_off.svg b/toonz/sources/toonz/Resources/sound_header_off.svg new file mode 100644 index 0000000..976ec79 --- /dev/null +++ b/toonz/sources/toonz/Resources/sound_header_off.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/sound_header_on.png b/toonz/sources/toonz/Resources/sound_header_on.png deleted file mode 100644 index c2ce3ca..0000000 Binary files a/toonz/sources/toonz/Resources/sound_header_on.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/sound_header_on.svg b/toonz/sources/toonz/Resources/sound_header_on.svg new file mode 100644 index 0000000..cc001a6 --- /dev/null +++ b/toonz/sources/toonz/Resources/sound_header_on.svg @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/svg.png b/toonz/sources/toonz/Resources/svg.png deleted file mode 100644 index 5e03f27..0000000 Binary files a/toonz/sources/toonz/Resources/svg.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/svg.svg b/toonz/sources/toonz/Resources/svg.svg new file mode 100644 index 0000000..36dd4ec --- /dev/null +++ b/toonz/sources/toonz/Resources/svg.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/switch.png b/toonz/sources/toonz/Resources/switch.png deleted file mode 100644 index c071025..0000000 Binary files a/toonz/sources/toonz/Resources/switch.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/switch.svg b/toonz/sources/toonz/Resources/switch.svg new file mode 100644 index 0000000..850f494 --- /dev/null +++ b/toonz/sources/toonz/Resources/switch.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/switch_on.png b/toonz/sources/toonz/Resources/switch_on.png deleted file mode 100644 index eb2e410..0000000 Binary files a/toonz/sources/toonz/Resources/switch_on.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/switch_on.svg b/toonz/sources/toonz/Resources/switch_on.svg new file mode 100644 index 0000000..f1c9f67 --- /dev/null +++ b/toonz/sources/toonz/Resources/switch_on.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/switch_over.png b/toonz/sources/toonz/Resources/switch_over.png deleted file mode 100644 index 7738a83..0000000 Binary files a/toonz/sources/toonz/Resources/switch_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/switch_over.svg b/toonz/sources/toonz/Resources/switch_over.svg new file mode 100644 index 0000000..7c7aac9 --- /dev/null +++ b/toonz/sources/toonz/Resources/switch_over.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/unknown.png b/toonz/sources/toonz/Resources/unknown.png deleted file mode 100644 index 67016f6..0000000 Binary files a/toonz/sources/toonz/Resources/unknown.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/unknown.svg b/toonz/sources/toonz/Resources/unknown.svg new file mode 100644 index 0000000..b46ffe1 --- /dev/null +++ b/toonz/sources/toonz/Resources/unknown.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/vcfolder_close.png b/toonz/sources/toonz/Resources/vcfolder_close.png deleted file mode 100644 index 8ba923c..0000000 Binary files a/toonz/sources/toonz/Resources/vcfolder_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/vcfolder_close.svg b/toonz/sources/toonz/Resources/vcfolder_close.svg new file mode 100644 index 0000000..60d9f6b --- /dev/null +++ b/toonz/sources/toonz/Resources/vcfolder_close.svg @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/vcfolder_mis_close.png b/toonz/sources/toonz/Resources/vcfolder_mis_close.png deleted file mode 100644 index b98c78b..0000000 Binary files a/toonz/sources/toonz/Resources/vcfolder_mis_close.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/vcfolder_mis_close.svg b/toonz/sources/toonz/Resources/vcfolder_mis_close.svg new file mode 100644 index 0000000..b68dab3 --- /dev/null +++ b/toonz/sources/toonz/Resources/vcfolder_mis_close.svg @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/vcfolder_mis_open.png b/toonz/sources/toonz/Resources/vcfolder_mis_open.png deleted file mode 100644 index ba9eaf8..0000000 Binary files a/toonz/sources/toonz/Resources/vcfolder_mis_open.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/vcfolder_mis_open.svg b/toonz/sources/toonz/Resources/vcfolder_mis_open.svg new file mode 100644 index 0000000..c2bc220 --- /dev/null +++ b/toonz/sources/toonz/Resources/vcfolder_mis_open.svg @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/vcroot.png b/toonz/sources/toonz/Resources/vcroot.png deleted file mode 100644 index c402c5f..0000000 Binary files a/toonz/sources/toonz/Resources/vcroot.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/vcroot.svg b/toonz/sources/toonz/Resources/vcroot.svg new file mode 100644 index 0000000..90df88c --- /dev/null +++ b/toonz/sources/toonz/Resources/vcroot.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonz/Resources/viewtable_off.png b/toonz/sources/toonz/Resources/viewtable_off.png deleted file mode 100644 index a11fd6a..0000000 Binary files a/toonz/sources/toonz/Resources/viewtable_off.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/viewtable_on.png b/toonz/sources/toonz/Resources/viewtable_on.png deleted file mode 100644 index 9e4749c..0000000 Binary files a/toonz/sources/toonz/Resources/viewtable_on.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/viewtable_over.png b/toonz/sources/toonz/Resources/viewtable_over.png deleted file mode 100644 index 109c8c8..0000000 Binary files a/toonz/sources/toonz/Resources/viewtable_over.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/x_lock.png b/toonz/sources/toonz/Resources/x_lock.png deleted file mode 100644 index 80ec081..0000000 Binary files a/toonz/sources/toonz/Resources/x_lock.png and /dev/null differ diff --git a/toonz/sources/toonz/Resources/x_lock.svg b/toonz/sources/toonz/Resources/x_lock.svg new file mode 100644 index 0000000..9a0e953 --- /dev/null +++ b/toonz/sources/toonz/Resources/x_lock.svg @@ -0,0 +1,13 @@ + + + + + + + diff --git a/toonz/sources/toonz/castselection.cpp b/toonz/sources/toonz/castselection.cpp index fd5726c..c284aee 100644 --- a/toonz/sources/toonz/castselection.cpp +++ b/toonz/sources/toonz/castselection.cpp @@ -138,9 +138,9 @@ int SoundCastItem::getFrameCount() const { //----------------------------------------------------------------------------- QPixmap SoundCastItem::getPixmap(bool isSelected) const { - static QPixmap loudspeaker(":Resources/audio.png"); - return scalePixmapKeepingAspectRatio(loudspeaker, m_itemPixmapSize, - Qt::transparent); + static QPixmap loudspeaker(svgToPixmap( + ":Resources/audio.svg", m_itemPixmapSize, Qt::KeepAspectRatio)); + return loudspeaker; } //----------------------------------------------------------------------------- @@ -174,9 +174,9 @@ int PaletteCastItem::getFrameCount() const { //----------------------------------------------------------------------------- QPixmap PaletteCastItem::getPixmap(bool isSelected) const { - static QPixmap palette(":Resources/paletteicon.png"); - return scalePixmapKeepingAspectRatio(palette, m_itemPixmapSize, - Qt::transparent); + static QPixmap palette(svgToPixmap(":Resources/paletteicon.svg", + m_itemPixmapSize, Qt::KeepAspectRatio)); + return palette; } bool PaletteCastItem::exists() const { diff --git a/toonz/sources/toonz/cleanupsettingspopup.cpp b/toonz/sources/toonz/cleanupsettingspopup.cpp index 505bb65..8354ddc 100644 --- a/toonz/sources/toonz/cleanupsettingspopup.cpp +++ b/toonz/sources/toonz/cleanupsettingspopup.cpp @@ -610,13 +610,13 @@ CleanupSettings::CleanupSettings(QWidget *parent) leftToolBar->setFixedWidth(110); - m_swatchAct = new QAction(createQIconOnOffPNG("preview", true), + m_swatchAct = new QAction(createQIconOnOff("preview", true), tr("Toggle Swatch Preview"), this); m_swatchAct->setCheckable(true); leftToolBar->addAction(m_swatchAct); leftToolBar->addSeparator(); - m_opacityAct = new QAction(createQIconOnOffPNG("opacitycheck", true), + m_opacityAct = new QAction(createQIconOnOff("opacitycheck", true), tr("Toggle Opacity Check"), this); m_opacityAct->setCheckable(true); leftToolBar->addAction(m_opacityAct); @@ -631,14 +631,14 @@ CleanupSettings::CleanupSettings(QWidget *parent) rightToolBar->setFixedWidth(110); - QAction *saveAct = new QAction(createQIconOnOffPNG("save", false), - tr("Save Settings"), this); + QAction *saveAct = + new QAction(createQIconOnOff("save", false), tr("Save Settings"), this); rightToolBar->addAction(saveAct); - QAction *loadAct = new QAction(createQIconOnOffPNG("load", false), - tr("Load Settings"), this); + QAction *loadAct = + new QAction(createQIconOnOff("load", false), tr("Load Settings"), this); rightToolBar->addAction(loadAct); rightToolBar->addSeparator(); - QAction *resetAct = new QAction(createQIconOnOffPNG("resetsize", false), + QAction *resetAct = new QAction(createQIconOnOff("resetsize", false), tr("Reset Settings"), this); rightToolBar->addAction(resetAct); diff --git a/toonz/sources/toonz/dvdirtreeview.cpp b/toonz/sources/toonz/dvdirtreeview.cpp index 71f739d..60ca55e 100644 --- a/toonz/sources/toonz/dvdirtreeview.cpp +++ b/toonz/sources/toonz/dvdirtreeview.cpp @@ -199,7 +199,8 @@ void DvDirTreeViewDelegate::paint(QPainter *painter, QPixmap px = node->getPixmap(m_treeView->isExpanded(index)); if (!px.isNull()) { int x = rect.left(); - int y = rect.top() + (rect.height() - px.height()) / 2; + int y = + rect.top() + (rect.height() - px.height() / px.devicePixelRatio()) / 2; painter->drawPixmap(QPoint(x, y), px); } diff --git a/toonz/sources/toonz/exportscenepopup.cpp b/toonz/sources/toonz/exportscenepopup.cpp index f8242ec..4306f18 100644 --- a/toonz/sources/toonz/exportscenepopup.cpp +++ b/toonz/sources/toonz/exportscenepopup.cpp @@ -115,8 +115,10 @@ ExportSceneDvDirModelFileFolderNode::createExposeSceneNode( // ExportSceneDvDirModelProjectNode QPixmap ExportSceneDvDirModelProjectNode::getPixmap(bool isOpen) const { - static QPixmap openProjectPixmap(":Resources/browser_project_open.png"); - static QPixmap closeProjectPixmap(":Resources/browser_project_close.png"); + static QPixmap openProjectPixmap( + svgToPixmap(":Resources/browser_project_open.svg")); + static QPixmap closeProjectPixmap( + svgToPixmap(":Resources/browser_project_close.svg")); return isOpen ? openProjectPixmap : closeProjectPixmap; } @@ -155,7 +157,7 @@ void ExportSceneDvDirModelRootNode::refreshChildren() { ExportSceneDvDirModelSpecialFileFolderNode *projectRootNode = new ExportSceneDvDirModelSpecialFileFolderNode(this, L"Project root", projectRoot); - projectRootNode->setPixmap(QPixmap(":Resources/projects.png")); + projectRootNode->setPixmap(QPixmap(svgToPixmap(":Resources/projects.svg"))); m_projectRootNodes.push_back(projectRootNode); addChild(projectRootNode); } @@ -176,7 +178,7 @@ void ExportSceneDvDirModelRootNode::refreshChildren() { new ExportSceneDvDirModelSpecialFileFolderNode( this, repo.m_name.toStdWString(), TFilePath(repo.m_localPath.toStdWString())); - node->setPixmap(QPixmap(":Resources/vcroot.png")); + node->setPixmap(QPixmap(svgToPixmap(":Resources/vcroot.svg"))); addChild(node); } //} diff --git a/toonz/sources/toonz/filebrowser.cpp b/toonz/sources/toonz/filebrowser.cpp index 8e100ef..0fafddf 100644 --- a/toonz/sources/toonz/filebrowser.cpp +++ b/toonz/sources/toonz/filebrowser.cpp @@ -895,20 +895,20 @@ QVariant FileBrowser::getItemData(int index, DataType dataType, QSize iconSize = m_itemViewer->getPanel()->getIconSize(); // parent folder icons if (item.m_path == m_folder.getParentDir()) { - static QPixmap folderUpPixmap(":Resources/folderup_icon.png"); - return scalePixmapKeepingAspectRatio(folderUpPixmap, iconSize, - QColor(Qt::transparent)); + static QPixmap folderUpPixmap(svgToPixmap(":Resources/folderup_icon.svg", + iconSize, Qt::KeepAspectRatio)); + return folderUpPixmap; } // folder icons else if (item.m_isFolder) { if (item.m_isLink) { - static QPixmap linkIcon(":Resources/link_icon.png"); - return scalePixmapKeepingAspectRatio(linkIcon, iconSize, - QColor(Qt::transparent)); + static QPixmap linkIcon(svgToPixmap(":Resources/link_icon.svg", + iconSize, Qt::KeepAspectRatio)); + return linkIcon; } else { - static QPixmap folderIcon(":Resources/folder_icon.png"); - return scalePixmapKeepingAspectRatio(folderIcon, iconSize, - QColor(Qt::transparent)); + static QPixmap folderIcon(svgToPixmap(":Resources/folder_icon.svg", + iconSize, Qt::KeepAspectRatio)); + return folderIcon; } } diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cpp index 832f234..9dd57fc 100644 --- a/toonz/sources/toonz/filebrowsermodel.cpp +++ b/toonz/sources/toonz/filebrowsermodel.cpp @@ -351,8 +351,10 @@ DvDirModelNode *DvDirModelFileFolderNode::getNodeByPath(const TFilePath &path) { //----------------------------------------------------------------------------- QPixmap DvDirModelFileFolderNode::getPixmap(bool isOpen) const { - static QPixmap openFolderPixmap(":Resources/browser_folder_open.png"); - static QPixmap closeFolderPixmap(":Resources/browser_folder_close.png"); + static QPixmap openFolderPixmap( + svgToPixmap(":Resources/browser_folder_open.svg")); + static QPixmap closeFolderPixmap( + svgToPixmap(":Resources/browser_folder_close.svg")); return isOpen ? openFolderPixmap : closeFolderPixmap; } @@ -406,8 +408,10 @@ bool DvDirModelSceneFolderNode::setName(std::wstring newName) { //----------------------------------------------------------------------------- QPixmap DvDirModelSceneFolderNode::getPixmap(bool isOpen) const { - static QPixmap openFolderPixmap(":Resources/browser_scene_open.png"); - static QPixmap closeFolderPixmap(":Resources/browser_scene_close.png"); + static QPixmap openFolderPixmap( + svgToPixmap(":Resources/browser_scene_open.svg")); + static QPixmap closeFolderPixmap( + svgToPixmap(":Resources/browser_scene_close.svg")); return isOpen ? openFolderPixmap : closeFolderPixmap; } @@ -633,12 +637,18 @@ DvDirModelNode *DvDirVersionControlNode::makeChild(std::wstring name) { //----------------------------------------------------------------------------- QPixmap DvDirVersionControlNode::getPixmap(bool isOpen) const { - static QPixmap openFolderPixmap(":Resources/browser_folder_open.png"); - static QPixmap closeFolderPixmap(":Resources/browser_folder_close.png"); - static QPixmap openMissingPixmap(":Resources/vcfolder_mis_open.png"); - static QPixmap closeMissingPixmap(":Resources/vcfolder_mis_close.png"); - static QPixmap openSceneFolderPixmap(":Resources/browser_scene_open.png"); - static QPixmap closeSceneFolderPixmap(":Resources/browser_scene_close.png"); + static QPixmap openFolderPixmap( + svgToPixmap(":Resources/browser_folder_open.svg")); + static QPixmap closeFolderPixmap( + svgToPixmap(":Resources/browser_folder_open.svg")); + static QPixmap openMissingPixmap( + svgToPixmap(":Resources/vcfolder_mis_open.svg")); + static QPixmap closeMissingPixmap( + svgToPixmap(":Resources/vcfolder_mis_close.svg")); + static QPixmap openSceneFolderPixmap( + svgToPixmap(":Resources/browser_scene_open.svg")); + static QPixmap closeSceneFolderPixmap( + svgToPixmap(":Resources/browser_scene_close.svg")); if (TFileStatus(getPath()).doesExist()) { if (getPath().getType() == "tnz") @@ -763,7 +773,7 @@ DvDirVersionControlRootNode::DvDirVersionControlRootNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirVersionControlNode(parent, name, path) { - setPixmap(QPixmap(":Resources/vcroot.png")); + setPixmap(svgToPixmap(":Resources/vcroot.svg")); setIsUnderVersionControl(true); } @@ -810,10 +820,14 @@ void DvDirVersionControlProjectNode::makeCurrent() { //----------------------------------------------------------------------------- QPixmap DvDirVersionControlProjectNode::getPixmap(bool isOpen) const { - static QPixmap openPixmap(":Resources/browser_vcproject_open.png"); - static QPixmap closePixmap(":Resources/browser_vcproject_close.png"); - static QPixmap openMissingPixmap(":Resources/vcfolder_mis_open.png"); - static QPixmap closeMissingPixmap(":Resources/vcfolder_mis_close.png"); + static QPixmap openPixmap( + svgToPixmap(":Resources/browser_vcproject_open.svg")); + static QPixmap closePixmap( + svgToPixmap(":Resources/browser_vcproject_close.svg")); + static QPixmap openMissingPixmap( + svgToPixmap(":Resources/vcfolder_mis_open.svg")); + static QPixmap closeMissingPixmap( + svgToPixmap(":Resources/vcfolder_mis_close.svg")); if (TFileStatus(getPath()).doesExist()) return isOpen ? openPixmap : closePixmap; @@ -904,8 +918,10 @@ void DvDirModelProjectNode::makeCurrent() { //----------------------------------------------------------------------------- QPixmap DvDirModelProjectNode::getPixmap(bool isOpen) const { - static QPixmap openProjectPixmap(":Resources/browser_project_open.png"); - static QPixmap closeProjectPixmap(":Resources/browser_project_close.png"); + static QPixmap openProjectPixmap( + svgToPixmap(":Resources/browser_project_open.svg")); + static QPixmap closeProjectPixmap( + svgToPixmap(":Resources/browser_project_close.svg")); return isOpen ? openProjectPixmap : closeProjectPixmap; } @@ -986,8 +1002,10 @@ void DvDirModelDayNode::visualizeContent(FileBrowser *browser) { //----------------------------------------------------------------------------- QPixmap DvDirModelDayNode::getPixmap(bool isOpen) const { - static QPixmap openFolderPixmap(":Resources/browser_folder_open.png"); - static QPixmap closeFolderPixmap(":Resources/browser_folder_close.png"); + static QPixmap openFolderPixmap( + svgToPixmap(":Resources/browser_folder_open.svg")); + static QPixmap closeFolderPixmap( + svgToPixmap(":Resources/browser_folder_close.svg")); return isOpen ? openFolderPixmap : closeFolderPixmap; } @@ -1019,7 +1037,7 @@ void DvDirModelHistoryNode::refreshChildren() { //----------------------------------------------------------------------------- QPixmap DvDirModelHistoryNode::getPixmap(bool isOpen) const { - static QPixmap pixmap(":Resources/history.png"); + static QPixmap pixmap(svgToPixmap(":Resources/history.svg")); return pixmap; } @@ -1058,7 +1076,7 @@ void DvDirModelMyComputerNode::refreshChildren() { //----------------------------------------------------------------------------- QPixmap DvDirModelMyComputerNode::getPixmap(bool isOpen) const { - static QPixmap pixmap(":Resources/my_computer.png"); + static QPixmap pixmap(svgToPixmap(":Resources/my_computer.svg")); return pixmap; } @@ -1130,7 +1148,7 @@ void DvDirModelNetworkNode::refreshChildren() { //----------------------------------------------------------------------------- QPixmap DvDirModelNetworkNode::getPixmap(bool isOpen) const { - static QPixmap pixmap(":Resources/network.png"); + static QPixmap pixmap(svgToPixmap(":Resources/network.svg")); return pixmap; } @@ -1170,17 +1188,17 @@ void DvDirModelRootNode::refreshChildren() { DvDirModelSpecialFileFolderNode *child; child = new DvDirModelSpecialFileFolderNode(this, L"My Documents", getMyDocumentsPath()); - child->setPixmap(QPixmap(":Resources/my_documents.png")); + child->setPixmap(svgToPixmap(":Resources/my_documents.svg")); addChild(child); child = new DvDirModelSpecialFileFolderNode(this, L"Desktop", getDesktopPath()); - child->setPixmap(QPixmap(":Resources/desktop.png")); + child->setPixmap(svgToPixmap(":Resources/desktop.svg")); addChild(child); child = new DvDirModelSpecialFileFolderNode( this, L"Library", ToonzFolder::getLibraryFolder()); - child->setPixmap(QPixmap(":Resources/library.png")); + child->setPixmap(svgToPixmap(":Resources/library.svg")); addChild(child); addChild(new DvDirModelHistoryNode(this)); @@ -1196,7 +1214,8 @@ void DvDirModelRootNode::refreshChildren() { DvDirModelSpecialFileFolderNode *projectRootNode = new DvDirModelSpecialFileFolderNode( this, L"Project root (" + roothDir + L")", projectRoot); - projectRootNode->setPixmap(QPixmap(":Resources/projects.png")); + projectRootNode->setPixmap( + QPixmap(svgToPixmap(":Resources/projects.svg"))); m_projectRootNodes.push_back(projectRootNode); addChild(projectRootNode); } diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 3886d64..0122762 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -655,8 +655,13 @@ void FilmstripFrames::drawFrameIcon(QPainter &p, const QRect &r, int index, p.setPen(Qt::black); p.drawLine(x0 - 1, y0, x0 - 1, y1); - QPixmap inbetweenPixmap(":Resources/filmstrip_inbetween.png"); - p.drawPixmap(x0 + 2, y1 - inbetweenPixmap.height() - 3, inbetweenPixmap); + QPixmap inbetweenPixmap( + svgToPixmap(":Resources/filmstrip_inbetween.svg")); + p.drawPixmap( + x0 + 2, + y1 - inbetweenPixmap.height() / inbetweenPixmap.devicePixelRatio() - + 3, + inbetweenPixmap); } } else { // non riesco (per qualche ragione) a visualizzare l'icona diff --git a/toonz/sources/toonz/flipbook.cpp b/toonz/sources/toonz/flipbook.cpp index 5dfb01b..40ce0b2 100644 --- a/toonz/sources/toonz/flipbook.cpp +++ b/toonz/sources/toonz/flipbook.cpp @@ -65,6 +65,7 @@ // Other widgets #include "toonzqt/flipconsole.h" #include "toonzqt/dvdialog.h" +#include "toonzqt/gutil.h" #include "filmstripselection.h" #include "castselection.h" #include "histogrampopup.h" @@ -2078,8 +2079,8 @@ void FlipBook::onDoubleClick(QMouseEvent *me) { if (!img) return; TAffine toWidgetRef(m_imageViewer->getImgToWidgetAffine()); - TRectD pixGeomD(TScale(1.0 / (double)m_imageViewer->getDevPixRatio()) * - toWidgetRef * getImageBoundsD(img)); + TRectD pixGeomD(TScale(1.0 / (double)getDevPixRatio()) * toWidgetRef * + getImageBoundsD(img)); // TRectD pixGeomD(toWidgetRef * getImageBoundsD(img)); TRect pixGeom(tceil(pixGeomD.x0), tceil(pixGeomD.y0), tfloor(pixGeomD.x1) - 1, tfloor(pixGeomD.y1) - 1); diff --git a/toonz/sources/toonz/insertfxpopup.cpp b/toonz/sources/toonz/insertfxpopup.cpp index e792da4..aea4782 100644 --- a/toonz/sources/toonz/insertfxpopup.cpp +++ b/toonz/sources/toonz/insertfxpopup.cpp @@ -165,17 +165,17 @@ InsertFxPopup::InsertFxPopup() m_fxTree->setObjectName("FxTreeView"); m_fxTree->setAlternatingRowColors(true); - QString open = QString(":Resources/folder_close.png"); - QString close = QString(":Resources/folder_open.png"); + QString open = QString(":Resources/folder_close.svg"); + QString close = QString(":Resources/folder_open.svg"); m_folderIcon.addFile(close, QSize(22, 22), QIcon::Normal, QIcon::On); m_folderIcon.addFile(open, QSize(22, 22), QIcon::Normal, QIcon::Off); - QString presetOpen = QString(":Resources/folderpreset_close.png"); - QString presetClose = QString(":Resources/folderpreset_open.png"); + QString presetOpen = QString(":Resources/folderpreset_close.svg"); + QString presetClose = QString(":Resources/folderpreset_open.svg"); m_presetIcon.addFile(presetClose, QSize(22, 22), QIcon::Normal, QIcon::On); m_presetIcon.addFile(presetOpen, QSize(22, 22), QIcon::Normal, QIcon::Off); - m_fxIcon = QIcon(QString(":Resources/fx.png")); + m_fxIcon = QIcon(QString(":Resources/fx.svg")); QList fxItems; diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index d7e44ee..d7f3516 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -1934,7 +1934,9 @@ void MainWindow::defineActions() { createMenuWindowsAction(MI_OpenFunctionEditor, tr("&Function Editor"), ""); createMenuWindowsAction(MI_OpenFilmStrip, tr("&Level Strip"), ""); createMenuWindowsAction(MI_OpenPalette, tr("&Palette"), ""); - createRightClickMenuAction(MI_OpenPltGizmo, tr("&Palette Gizmo"), ""); + QAction *pltGizmoAction = + createRightClickMenuAction(MI_OpenPltGizmo, tr("&Palette Gizmo"), ""); + pltGizmoAction->setIcon(QIcon(":Resources/palettegizmo.svg")); createRightClickMenuAction(MI_EraseUnusedStyles, tr("&Delete Unused Styles"), ""); createMenuWindowsAction(MI_OpenTasks, tr("&Tasks"), ""); diff --git a/toonz/sources/toonz/menubarpopup.cpp b/toonz/sources/toonz/menubarpopup.cpp index d8d4a71..acffd3a 100644 --- a/toonz/sources/toonz/menubarpopup.cpp +++ b/toonz/sources/toonz/menubarpopup.cpp @@ -82,8 +82,8 @@ public: /*- Menu title will be translated if the title is registered in translation * file -*/ setText(0, StackedMenuBar::tr(title.toStdString().c_str())); - QIcon subMenuIcon(":Resources/browser_folder_close.png"); - subMenuIcon.addFile(":Resources/browser_folder_open.png", QSize(), + QIcon subMenuIcon(":Resources/browser_folder_close.svg"); + subMenuIcon.addFile(":Resources/browser_folder_open.svg", QSize(), QIcon::Normal, QIcon::On); setIcon(0, subMenuIcon); setToolTip(0, QObject::tr( @@ -106,6 +106,7 @@ MenuBarTree::MenuBarTree(TFilePath& path, QWidget* parent) setDropIndicatorShown(true); setDefaultDropAction(Qt::MoveAction); setDragDropMode(QAbstractItemView::DragDrop); + setIconSize(QSize(21, 17)); setColumnCount(1); header()->close(); @@ -355,10 +356,11 @@ CommandListTree::CommandListTree(QWidget* parent) : QTreeWidget(parent) { setDragEnabled(true); setDragDropMode(QAbstractItemView::DragOnly); setColumnCount(1); + setIconSize(QSize(21, 17)); header()->close(); - QIcon menuFolderIcon(":Resources/browser_project_close.png"); - menuFolderIcon.addFile(":Resources/browser_project_open.png", QSize(), + QIcon menuFolderIcon(":Resources/browser_project_close.svg"); + menuFolderIcon.addFile(":Resources/browser_project_open.svg", QSize(), QIcon::Normal, QIcon::On); invisibleRootItem()->setIcon(0, menuFolderIcon); diff --git a/toonz/sources/toonz/pane.cpp b/toonz/sources/toonz/pane.cpp index 54d5ac8..80fc976 100644 --- a/toonz/sources/toonz/pane.cpp +++ b/toonz/sources/toonz/pane.cpp @@ -144,6 +144,23 @@ TPanelTitleBarButton::TPanelTitleBarButton(QWidget *parent, //----------------------------------------------------------------------------- +TPanelTitleBarButton::TPanelTitleBarButton(QWidget *parent, + const QPixmap &standardPixmap, + const QPixmap &rolloverPixmap, + const QPixmap &pressedPixmap) + : QWidget(parent) + , m_standardPixmap(standardPixmap) + , m_rolloverPixmap(rolloverPixmap) + , m_pressedPixmap(pressedPixmap) + , m_rollover(false) + , m_pressed(false) + , m_buttonSet(0) + , m_id(0) { + setFixedSize(m_standardPixmap.size() / m_standardPixmap.devicePixelRatio()); +} + +//----------------------------------------------------------------------------- + void TPanelTitleBarButton::setButtonSet(TPanelTitleBarButtonSet *buttonSet, int id) { m_buttonSet = buttonSet; @@ -355,16 +372,17 @@ void TPanelTitleBar::paintEvent(QPaintEvent *) { } if (dw->isFloating()) { - const static QPixmap closeButtonPixmap(":/Resources/close_pane.png"); + const static QPixmap closeButtonPixmap( + svgToPixmap(":/Resources/close_pane.svg", QSize(16, 16))); const static QPixmap closeButtonPixmapOver( - ":/Resources/close_pane_rollover.png"); + svgToPixmap(":/Resources/close_pane_rollover.svg", QSize(16, 16))); - QRect closeRect(rect.right() - 17, rect.top() + 1, 16, 16); + QPoint closeButtonPos(rect.right() - 17, rect.top() + 1); if (m_closeButtonHighlighted) - painter.drawPixmap(closeRect, closeButtonPixmapOver); + painter.drawPixmap(closeButtonPos, closeButtonPixmapOver); else - painter.drawPixmap(closeRect, closeButtonPixmap); + painter.drawPixmap(closeButtonPos, closeButtonPixmap); } painter.end(); diff --git a/toonz/sources/toonz/pane.h b/toonz/sources/toonz/pane.h index a32dd54..33f1697 100644 --- a/toonz/sources/toonz/pane.h +++ b/toonz/sources/toonz/pane.h @@ -27,6 +27,10 @@ public: const QString &rolloverPixmapName, const QString &pressedPixmapName); + TPanelTitleBarButton(QWidget *parent, const QPixmap &standardPixmap, + const QPixmap &rolloverPixmap, + const QPixmap &pressedPixmap); + //! call this method to make a radio button. id is the button identifier void setButtonSet(TPanelTitleBarButtonSet *buttonSet, int id); int getId() const { return m_id; } diff --git a/toonz/sources/toonz/projectpopup.cpp b/toonz/sources/toonz/projectpopup.cpp index 6c96c3b..d861571 100644 --- a/toonz/sources/toonz/projectpopup.cpp +++ b/toonz/sources/toonz/projectpopup.cpp @@ -41,8 +41,10 @@ using namespace DVGui; //----------------------------------------------------------------------------- QPixmap ProjectDvDirModelProjectNode::getPixmap(bool isOpen) const { - static QPixmap openProjectPixmap(":Resources/browser_project_open.png"); - static QPixmap closeProjectPixmap(":Resources/browser_project_close.png"); + static QPixmap openProjectPixmap( + svgToPixmap(":Resources/browser_project_open.svg")); + static QPixmap closeProjectPixmap( + svgToPixmap(":Resources/browser_project_close.svg")); return isOpen ? openProjectPixmap : closeProjectPixmap; } @@ -95,7 +97,7 @@ void ProjectDvDirModelRootNode::refreshChildren() { ProjectDvDirModelSpecialFileFolderNode *projectRootNode = new ProjectDvDirModelSpecialFileFolderNode( this, L"Project root (" + rootDir + L")", projectRoot); - projectRootNode->setPixmap(QPixmap(":Resources/projects.png")); + projectRootNode->setPixmap(svgToPixmap(":Resources/projects.svg")); addChild(projectRootNode); } @@ -110,7 +112,7 @@ void ProjectDvDirModelRootNode::refreshChildren() { new ProjectDvDirModelSpecialFileFolderNode( this, repo.m_name.toStdWString(), TFilePath(repo.m_localPath.toStdWString())); - node->setPixmap(QPixmap(":Resources/vcroot.png")); + node->setPixmap(svgToPixmap(":Resources/vcroot.svg")); addChild(node); } } diff --git a/toonz/sources/toonz/ruler.cpp b/toonz/sources/toonz/ruler.cpp index 7c5556a..d1b1666 100644 --- a/toonz/sources/toonz/ruler.cpp +++ b/toonz/sources/toonz/ruler.cpp @@ -102,10 +102,10 @@ double Ruler::getPan() const { if (m_viewer->is3DView()) // Vertical 3D return m_viewer->getPan3D().y; else // Vertical 2D - return aff.a23 / m_viewer->getDevPixRatio(); + return aff.a23 / getDevPixRatio(); else if (m_viewer->is3DView()) // Horizontal 3D return m_viewer->getPan3D().x; - return aff.a13 / m_viewer->getDevPixRatio(); // Horizontal 2D + return aff.a13 / getDevPixRatio(); // Horizontal 2D } //----------------------------------------------------------------------------- @@ -129,7 +129,7 @@ void Ruler::drawVertical(QPainter &p) { for (i = 0; i < count; i++) { QColor color = (m_moving && count - 1 == i ? QColor(0, 255, 255) : QColor(0, 0, 255)); - double v = guides[i] / (double)m_viewer->getDevPixRatio(); + double v = guides[i] / (double)getDevPixRatio(); int y = (int)(origin - zoom * v); p.fillRect(QRect(x0, y - 1, x1 - x0, 2), QBrush(color)); } @@ -184,7 +184,7 @@ void Ruler::drawHorizontal(QPainter &p) { for (i = 0; i < count; i++) { QColor color = (m_moving && count - 1 == i ? QColor(0, 255, 255) : QColor(0, 0, 255)); - double v = guides[i] / (double)m_viewer->getDevPixRatio(); + double v = guides[i] / (double)getDevPixRatio(); int x = (int)(origin + zoom * v); p.fillRect(QRect(x - 1, y0, 2, y1 - y0), QBrush(color)); } @@ -247,7 +247,7 @@ void Ruler::mousePressEvent(QMouseEvent *e) { int i; int count = guides.size(); for (i = 0; i < count; i++) { - double g = guides[i] / (double)m_viewer->getDevPixRatio(); + double g = guides[i] / (double)getDevPixRatio(); double dist2 = (g - v) * (g - v); if (selected < 0 || dist2 < minDist2) { minDist2 = dist2; @@ -256,7 +256,7 @@ void Ruler::mousePressEvent(QMouseEvent *e) { } if (selected < 0 || minDist2 > 25) { // crea una nuova guida - guides.push_back(v * m_viewer->getDevPixRatio()); + guides.push_back(v * getDevPixRatio()); m_viewer->update(); // aggiorna sprop!!!! } else { @@ -275,7 +275,7 @@ void Ruler::mousePressEvent(QMouseEvent *e) { void Ruler::mouseMoveEvent(QMouseEvent *e) { if (m_moving) { m_hiding = m_vertical ? (e->pos().x() < 0) : (e->pos().y() < 0); - getGuides().back() = posToValue(e->pos()) * m_viewer->getDevPixRatio(); + getGuides().back() = posToValue(e->pos()) * getDevPixRatio(); // aggiorna sprop!!!! update(); m_viewer->update(); @@ -290,7 +290,7 @@ void Ruler::mouseMoveEvent(QMouseEvent *e) { int i; int count = guides.size(); for (i = 0; i < count; i++) { - double g = guides[i] / (double)m_viewer->getDevPixRatio(); + double g = guides[i] / (double)getDevPixRatio(); double dist2 = (g - v) * (g - v); if (dist2 < minDist2) setToolTip(tr("Click and drag to move guide")); diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp index bda616c..36acebe 100644 --- a/toonz/sources/toonz/sceneviewer.cpp +++ b/toonz/sources/toonz/sceneviewer.cpp @@ -190,7 +190,8 @@ void copyFrontBufferToBackBuffer() { /*! Compute new 3Dposition and new 2D position. */ T3DPointD computeNew3DPosition(T3DPointD start3DPos, TPointD delta2D, TPointD &new2dPos, GLdouble modelView3D[16], - GLdouble projection3D[16], GLint viewport3D[4]) { + GLdouble projection3D[16], GLint viewport3D[4], + int devPixRatio) { GLdouble pos2D_x, pos2D_y, pos2D_z; gluProject(-start3DPos.x, -start3DPos.y, start3DPos.z, modelView3D, projection3D, viewport3D, &pos2D_x, &pos2D_y, &pos2D_z); @@ -198,7 +199,7 @@ T3DPointD computeNew3DPosition(T3DPointD start3DPos, TPointD delta2D, GLdouble pos3D_x, pos3D_y, pos3D_z; gluUnProject(new2dPos.x, new2dPos.y, 1, modelView3D, projection3D, viewport3D, &pos3D_x, &pos3D_y, &pos3D_z); - new2dPos.y = viewport3D[3] - new2dPos.y - 20; + new2dPos.y = viewport3D[3] - new2dPos.y - 20 * devPixRatio; return T3DPointD(pos3D_x, pos3D_y, pos3D_z); } @@ -525,13 +526,9 @@ SceneViewer::SceneViewer(ImageUtils::FullScreenWidget *parent) for (int i = 0; i < tArrayCount(m_viewAff); i++) setViewMatrix(getNormalZoomScale(), i); - QImage image; - image.load(QString(":Resources/3Dside_r.png")); - m_3DSideR = rasterFromQImage(image); - image.load(QString(":Resources/3Dside_l.png")); - m_3DSideL = rasterFromQImage(image); - image.load(QString(":Resources/3Dtop.png")); - m_3DTop = rasterFromQImage(image); + m_3DSideR = rasterFromQPixmap(svgToPixmap(":Resources/3Dside_r.svg")); + m_3DSideL = rasterFromQPixmap(svgToPixmap(":Resources/3Dside_l.svg")); + m_3DTop = rasterFromQPixmap(svgToPixmap(":Resources/3Dtop.svg")); makeCurrent(); TGlContext context(tglGetCurrentContext()); @@ -1324,7 +1321,7 @@ void SceneViewer::drawOverlay() { if (m_phi3D > 0) { T3DPointD topRasterPos3D = computeNew3DPosition( T3DPointD(500, 500, 1000), TPointD(-10, -10), m_topRasterPos, - modelView3D, projection3D, viewport3D); + modelView3D, projection3D, viewport3D, getDevPixRatio()); glRasterPos3f(topRasterPos3D.x, topRasterPos3D.y, topRasterPos3D.z); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glDrawPixels(m_3DTop->getWrap(), m_3DTop->getLy(), TGL_FMT, TGL_TYPE, @@ -1332,7 +1329,7 @@ void SceneViewer::drawOverlay() { T3DPointD sideRasterPos3D = computeNew3DPosition( T3DPointD(-500, -500, 1000), TPointD(-10, -10), m_sideRasterPos, - modelView3D, projection3D, viewport3D); + modelView3D, projection3D, viewport3D, getDevPixRatio()); glRasterPos3f(sideRasterPos3D.x, sideRasterPos3D.y, sideRasterPos3D.z); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glDrawPixels(m_3DSideR->getWrap(), m_3DSideR->getLy(), TGL_FMT, TGL_TYPE, @@ -1340,7 +1337,7 @@ void SceneViewer::drawOverlay() { } else { T3DPointD topRasterPos3D = computeNew3DPosition( T3DPointD(-500, 500, 1000), TPointD(-10, -10), m_topRasterPos, - modelView3D, projection3D, viewport3D); + modelView3D, projection3D, viewport3D, getDevPixRatio()); glRasterPos3f(topRasterPos3D.x, topRasterPos3D.y, topRasterPos3D.z); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glDrawPixels(m_3DTop->getWrap(), m_3DTop->getLy(), TGL_FMT, TGL_TYPE, @@ -1348,7 +1345,7 @@ void SceneViewer::drawOverlay() { T3DPointD sideRasterPos3D = computeNew3DPosition( T3DPointD(500, -500, 1000), TPointD(-10, -10), m_sideRasterPos, - modelView3D, projection3D, viewport3D); + modelView3D, projection3D, viewport3D, getDevPixRatio()); glRasterPos3f(sideRasterPos3D.x, sideRasterPos3D.y, sideRasterPos3D.z); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glDrawPixels(m_3DSideL->getWrap(), m_3DSideL->getLy(), TGL_FMT, TGL_TYPE, diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp index 98767b5..bbbd51e 100644 --- a/toonz/sources/toonz/sceneviewerevents.cpp +++ b/toonz/sources/toonz/sceneviewerevents.cpp @@ -371,9 +371,10 @@ void SceneViewer::mouseMoveEvent(QMouseEvent *event) { void SceneViewer::onMove(const TMouseEvent &event) { if (m_freezedStatus != NO_FREEZED) return; - QPoint curPos = event.mousePos() * getDevPixRatio(); - bool cursorSet = false; - m_lastMousePos = curPos; + int devPixRatio = getDevPixRatio(); + QPoint curPos = event.mousePos() * devPixRatio; + bool cursorSet = false; + m_lastMousePos = curPos; if (m_editPreviewSubCamera) { if (!PreviewSubCameraManager::instance()->mouseMoveEvent(this, event)) @@ -416,12 +417,12 @@ void SceneViewer::onMove(const TMouseEvent &event) { return; else if (is3DView() && m_mouseButton == Qt::NoButton) { TRectD rect = TRectD(TPointD(m_topRasterPos.x, m_topRasterPos.y), - TDimensionD(20, 20)); + TDimensionD(20 * devPixRatio, 20 * devPixRatio)); if (rect.contains(TPointD(curPos.x(), curPos.y()))) m_current3DDevice = TOP_3D; else { rect = TRectD(TPointD(m_sideRasterPos.x, m_sideRasterPos.y), - TDimensionD(20, 20)); + TDimensionD(20 * devPixRatio, 20 * devPixRatio)); if (rect.contains(TPointD(curPos.x(), curPos.y()))) { if (m_phi3D > 0) m_current3DDevice = SIDE_RIGHT_3D; diff --git a/toonz/sources/toonz/shortcutpopup.cpp b/toonz/sources/toonz/shortcutpopup.cpp index 23f041c..8daa440 100644 --- a/toonz/sources/toonz/shortcutpopup.cpp +++ b/toonz/sources/toonz/shortcutpopup.cpp @@ -377,10 +377,10 @@ ShortcutPopup::ShortcutPopup() m_exportButton->setToolTip(tr("Export Current Shortcuts")); m_deletePresetButton = new QPushButton("Delete", this); m_deletePresetButton->setToolTip(tr("Delete Current Preset")); - m_deletePresetButton->setIcon(QIcon(":Resources/delete_on.png")); + m_deletePresetButton->setIcon(QIcon(":Resources/delete_on.svg")); m_savePresetButton = new QPushButton("Save As", this); m_savePresetButton->setToolTip(tr("Save Current Shortcuts as New Preset")); - m_savePresetButton->setIcon(QIcon(":Resources/saveas_on.png")); + m_savePresetButton->setIcon(QIcon(":Resources/saveas_on.svg")); m_loadPresetButton = new QPushButton(tr("Load")); m_loadPresetButton->setToolTip(tr("Use selected preset as shortcuts")); m_loadPresetButton->setIcon(QIcon(":Resources/green.png")); diff --git a/toonz/sources/toonz/subcameramanager.cpp b/toonz/sources/toonz/subcameramanager.cpp index 3975403..265570e 100644 --- a/toonz/sources/toonz/subcameramanager.cpp +++ b/toonz/sources/toonz/subcameramanager.cpp @@ -119,7 +119,7 @@ bool PreviewSubCameraManager::mousePressEvent(SceneViewer *viewer, if (viewer->is3DView()) return true; m_mousePressed = true; - m_mousePressPos = event.mousePos() * viewer->getDevPixRatio(); + m_mousePressPos = event.mousePos() * getDevPixRatio(); m_dragType = getSubCameraDragEnum(viewer, m_mousePressPos); if (bitwiseExclude(m_dragType, OUTER)) @@ -133,7 +133,7 @@ bool PreviewSubCameraManager::mousePressEvent(SceneViewer *viewer, bool PreviewSubCameraManager::mouseMoveEvent(SceneViewer *viewer, const TMouseEvent &event) { if (viewer->is3DView()) return true; - QPoint curPos(event.mousePos() * viewer->getDevPixRatio()); + QPoint curPos(event.mousePos() * getDevPixRatio()); if (event.buttons() == Qt::LeftButton) { if (!bitwiseContains(m_dragType, INNER)) { if (abs(curPos.x() - m_mousePressPos.x()) > 10 || diff --git a/toonz/sources/toonz/svncommitdialog.cpp b/toonz/sources/toonz/svncommitdialog.cpp index 0795766..e3bfeb1 100644 --- a/toonz/sources/toonz/svncommitdialog.cpp +++ b/toonz/sources/toonz/svncommitdialog.cpp @@ -610,7 +610,7 @@ void SVNCommitDialog::addUnversionedItem(const QString &relativePath) { QTreeWidgetItem *parent = 0; QString tempString = ""; - QIcon folderIcon = QIcon(":Resources/vcfolder_close.png"); + QIcon folderIcon = QIcon(":Resources/vcfolder_close.svg"); int levelCount = list.count(); for (int i = 0; i < levelCount; i++) { @@ -659,7 +659,7 @@ void SVNCommitDialog::addUnversionedFolders(const QDir &dir, dir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot); int count = entries.count(); - QIcon folderIcon = QIcon(":Resources/vcfolder_close.png"); + QIcon folderIcon = QIcon(":Resources/vcfolder_close.svg"); for (int i = 0; i < count; i++) { QString entry = entries.at(i); @@ -723,7 +723,7 @@ void SVNCommitDialog::addModifiedItem(const QString &relativePath) { QString tempString = ""; QBrush brush(Qt::red); - QIcon folderIcon = QIcon(":Resources/vcfolder_close.png"); + QIcon folderIcon = QIcon(":Resources/vcfolder_close.svg"); int levelCount = list.count(); for (int i = 0; i < levelCount; i++) { diff --git a/toonz/sources/toonz/toonz.qrc b/toonz/sources/toonz/toonz.qrc index bf68852..3df60e9 100644 --- a/toonz/sources/toonz/toonz.qrc +++ b/toonz/sources/toonz/toonz.qrc @@ -3,9 +3,9 @@ Resources/3D.png Resources/3D_on.png Resources/3D_over.png - Resources/3Dside_l.png - Resources/3Dside_r.png - Resources/3Dtop.png + Resources/3Dside_l.svg + Resources/3Dside_r.svg + Resources/3Dtop.svg Resources/RGBpicker.svg Resources/RGBpicker_rollover.svg Resources/arrow_down.png @@ -16,13 +16,12 @@ Resources/arrow_right_over.png Resources/arrow_up.png Resources/arrow_up_over.png - Resources/audio.png Resources/backg.png Resources/bender.png Resources/bender.svg Resources/bender_rollover.svg Resources/bottomover.png - Resources/broken.png + Resources/broken.svg Resources/brush.png Resources/brush.svg Resources/brush_rollover.svg @@ -52,9 +51,8 @@ Resources/cleanup_done_with_errors.svg Resources/cleanup_computing.svg Resources/cleanup_suspended.svg - Resources/close_pane.png - Resources/close_pane_rollover.png - Resources/closedfolder.png + Resources/close_pane.svg + Resources/close_pane_rollover.svg Resources/collapse.png Resources/collapse_click.png Resources/collapse_over.png @@ -63,7 +61,7 @@ Resources/compare.svg Resources/compare_click.svg Resources/compare_over.svg - Resources/curve.png + Resources/curve.svg Resources/custom_off.svg Resources/custom_on.svg Resources/cutter.png @@ -71,7 +69,7 @@ Resources/cutter_rollover.svg Resources/paintbrush.svg Resources/paintbrush_rollover.svg - Resources/desktop.png + Resources/desktop.svg Resources/downTitle.png Resources/edit.svg Resources/edit_rollover.svg @@ -83,11 +81,8 @@ Resources/fill.png Resources/fill.svg Resources/fill_rollover.svg - Resources/folder_new.png - Resources/folder_new_click.png - Resources/folder_new_over.png - Resources/folderpreset_open.png - Resources/folderpreset_close.png + Resources/folderpreset_open.svg + Resources/folderpreset_close.svg Resources/folderup.svg Resources/folderup_over.svg Resources/framefirst.svg @@ -105,18 +100,16 @@ Resources/freeze.png Resources/freeze_on.png Resources/freeze_over.png - Resources/functoggle00.png - Resources/functoggle10.png - Resources/functoggle11.png - Resources/fx.png + Resources/fx.svg Resources/geometric.svg Resources/geometric_rollover.svg Resources/h_slider.png Resources/hand.svg Resources/hand_rollover.svg Resources/histograms.svg + Resources/histograms_click.svg Resources/histograms_over.svg - Resources/history.png + Resources/history.svg Resources/hook.svg Resources/hook_rollover.svg Resources/iron.png @@ -124,18 +117,10 @@ Resources/iron_rollover.svg Resources/iconplay.png Resources/iconpause.png - Resources/key.bmp - Resources/key_off.png - Resources/key_on.png - Resources/keynext.png - Resources/keynext_dim.png - Resources/keynext_over.png - Resources/keyprev.png - Resources/keyprev_dim.png - Resources/keyprev_over.png + Resources/key.svg Resources/leftTitle.png Resources/leftTitle_inactive.png - Resources/library.png + Resources/library.svg Resources/link_child.bmp Resources/link_child_rollover.bmp Resources/link_closed.bmp @@ -150,14 +135,14 @@ Resources/magnet.png Resources/magnet.svg Resources/magnet_rollover.svg - Resources/motionpath.png + Resources/motionpath_fileicon.svg Resources/motionpath.svg Resources/motionpath_delete.svg Resources/motionpath_rot.svg Resources/move.png - Resources/my_computer.png - Resources/my_documents.png - Resources/network.png + Resources/my_computer.svg + Resources/my_documents.svg + Resources/network.svg Resources/new_raster_level.png Resources/new_raster_level_over.png Resources/new_raster_level_click.png @@ -172,28 +157,21 @@ Resources/newstyle.png Resources/newstyle_click.png Resources/newstyle_over.png - Resources/nextkey.png - Resources/nextkey_disabled.png - Resources/nextkey_over.png Resources/no_specialstyle.png Resources/no_vectorbrush.png Resources/no_mypaintbrush.png - Resources/openedfolder.png - Resources/options.png - Resources/options_click.png - Resources/options_over.png Resources/palette_add_color.bmp Resources/palette_add_page.bmp Resources/palette_chooser.bmp Resources/palette_color.bmp Resources/palette_color.png - Resources/palette_header.png + Resources/palette_header.svg Resources/palette_key.bmp Resources/palette_pattern.bmp Resources/palette_settings.bmp Resources/palette_texture.bmp Resources/palette_view_mode.bmp - Resources/paletteicon.png + Resources/paletteicon.svg Resources/pan.png Resources/pause.svg Resources/pause_click.svg @@ -220,11 +198,8 @@ Resources/play_over.svg Resources/preview_toggle.png Resources/previuos_folder.png - Resources/prevkey.png - Resources/prevkey_disabled.png - Resources/prevkey_over.png - Resources/projects.png - Resources/psd.png + Resources/projects.svg + Resources/psd.svg Resources/pump.png Resources/pump.svg Resources/pump_rollover.svg @@ -258,7 +233,7 @@ Resources/schematic_spin_arrows.svg Resources/schematic_spline_aim_rhomb.svg Resources/schematic_spline_aim_square.svg - Resources/selected_key.bmp + Resources/selected_key.svg Resources/selection.svg Resources/selection_add.png Resources/selection_convert.png @@ -274,8 +249,8 @@ Resources/sound.svg Resources/sound_click.svg Resources/sound_over.svg - Resources/sound_header_off.png - Resources/sound_header_on.png + Resources/sound_header_off.svg + Resources/sound_header_on.svg Resources/sound_toggle.png Resources/special_off.svg Resources/special_on.svg @@ -307,10 +282,10 @@ Resources/sub_leave_click.png Resources/swap_off.svg Resources/swap_on.svg - Resources/svg.png - Resources/switch.png - Resources/switch_on.png - Resources/switch_over.png + Resources/svg.svg + Resources/switch.svg + Resources/switch_on.svg + Resources/switch_over.svg Resources/table_view_act.png Resources/tape.png Resources/tape.svg @@ -330,7 +305,7 @@ Resources/type_rollover.svg Resources/tzpicon.png Resources/tzuicon.png - Resources/unknown.png + Resources/unknown.svg Resources/upTitle.png Resources/v_chandle.png Resources/view_camera.png @@ -345,19 +320,19 @@ Resources/viewpreview.png Resources/viewpreview_on.png Resources/viewpreview_over.png - Resources/viewtable_off.png - Resources/viewtable_on.png - Resources/viewtable_over.png + Resources/viewtable_off.svg + Resources/viewtable_on.svg + Resources/viewtable_over.svg Resources/work.png Resources/zoom.png Resources/zoom.svg Resources/zoom_rollover.svg - Resources/browser_folder_open.png - Resources/browser_folder_close.png - Resources/browser_scene_open.png - Resources/browser_scene_close.png - Resources/browser_project_open.png - Resources/browser_project_close.png + Resources/browser_folder_open.svg + Resources/browser_folder_close.svg + Resources/browser_scene_open.svg + Resources/browser_scene_close.svg + Resources/browser_project_open.svg + Resources/browser_project_close.svg Resources/half_R.svg Resources/half_R_click.svg Resources/half_R_over.svg @@ -385,13 +360,13 @@ Resources/flip_h.png Resources/flip_v.png Resources/level_select.png - Resources/vcroot.png + Resources/vcroot.svg Resources/vcfolder_open.png - Resources/vcfolder_close.png - Resources/vcfolder_mis_open.png - Resources/vcfolder_mis_close.png - Resources/browser_vcproject_close.png - Resources/browser_vcproject_open.png + Resources/vcfolder_close.svg + Resources/vcfolder_mis_open.svg + Resources/vcfolder_mis_close.svg + Resources/browser_vcproject_close.svg + Resources/browser_vcproject_open.svg Resources/waiting.gif Resources/green.png Resources/red.png @@ -429,9 +404,9 @@ Resources/fieldguide.png Resources/fieldguide_over.png Resources/fieldguide_on.png - Resources/folderup_icon.png - Resources/link_icon.png - Resources/folder_icon.png + Resources/folderup_icon.svg + Resources/link_icon.svg + Resources/folder_icon.svg Resources/fb_history_back_enable.svg Resources/fb_history_back_disable.svg Resources/fb_history_fwd_enable.svg @@ -439,8 +414,8 @@ Resources/x_prev_eye.png Resources/x_table_view.png Resources/x_table_view_transp.png - Resources/x_lock.png - Resources/filmstrip_inbetween.png + Resources/x_lock.svg + Resources/filmstrip_inbetween.svg Resources/history_normal.png Resources/history_brush.png Resources/history_eraser.png diff --git a/toonz/sources/toonz/tpanels.cpp b/toonz/sources/toonz/tpanels.cpp index 8ed5795..0fe5898 100644 --- a/toonz/sources/toonz/tpanels.cpp +++ b/toonz/sources/toonz/tpanels.cpp @@ -453,8 +453,9 @@ void PaletteViewerPanel::reset() { void PaletteViewerPanel::initializeTitleBar() { m_isCurrentButton = new TPanelTitleBarButton( - getTitleBar(), ":Resources/switch.png", ":Resources/switch_over.png", - ":Resources/switch_on.png"); + getTitleBar(), svgToPixmap(":Resources/switch.svg"), + svgToPixmap(":Resources/switch_over.svg"), + svgToPixmap(":Resources/switch_on.svg")); getTitleBar()->add(QPoint(-54, 2), m_isCurrentButton); m_isCurrentButton->setPressed(true); connect(m_isCurrentButton, SIGNAL(toggled(bool)), diff --git a/toonz/sources/toonz/versioncontroltimeline.cpp b/toonz/sources/toonz/versioncontroltimeline.cpp index d6a7a42..4250a87 100644 --- a/toonz/sources/toonz/versioncontroltimeline.cpp +++ b/toonz/sources/toonz/versioncontroltimeline.cpp @@ -440,32 +440,46 @@ QIcon SVNTimeline::createIcon(const QString &fileName) { filePixmap = rasterToQPixmap( IconGenerator::generateVectorFileIcon(path, iconSize, 1)); else if (type == "tpl") - filePixmap = QPixmap(":Resources/paletteicon.png"); + filePixmap = QPixmap(":Resources/paletteicon.svg"); else if (type == "tzp") filePixmap = QPixmap(":Resources/tzpicon.png"); else if (type == "tzu") filePixmap = QPixmap(":Resources/tzuicon.png"); else if (TFileType::getInfo(path) == TFileType::AUDIO_LEVEL) - filePixmap = QPixmap(":Resources/audio.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/audio.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (type == "scr") filePixmap = QPixmap(":Resources/savescreen.png"); else if (type == "psd") - filePixmap = QPixmap(":Resources/psd.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/psd.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (TFileType::isViewable(TFileType::getInfo(path)) || type == "tlv") filePixmap = rasterToQPixmap( IconGenerator::generateRasterFileIcon(path, iconSize, 1)); else if (type == "mpath") - filePixmap = QPixmap(":Resources/motionpath.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/motionpath_fileicon.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (type == "curve") - filePixmap = QPixmap(":Resources/curve.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/curve.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (type == "cln") - filePixmap = QPixmap(":Resources/cleanup.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/cleanup.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (type == "tnzbat") - filePixmap = QPixmap(":Resources/tasklist.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/tasklist.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); else if (type == "js") filePixmap = QPixmap(":Resources/scripticon.png"); else - filePixmap = QPixmap(":Resources/unknown.png"); + filePixmap = QPixmap(svgToPixmap(":Resources/unknown.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); } if (filePixmap.isNull()) return QIcon(); diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 11d818a..a31e947 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -1704,8 +1704,8 @@ void CellArea::drawKeyframe(QPainter &p, const QRect toBeUpdated) { c0 = visible.from().layer(); c1 = visible.to().layer(); - static QPixmap selectedKey = QPixmap(":Resources/selected_key.bmp"); - static QPixmap key = QPixmap(":Resources/key.bmp"); + static QPixmap selectedKey = svgToPixmap(":Resources/selected_key.svg"); + static QPixmap key = svgToPixmap(":Resources/key.svg"); const QRect &keyRect = o->rect(PredefinedRect::KEY_ICON); TXsheet *xsh = m_viewer->getXsheet(); diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp index 30f064d..83e405d 100644 --- a/toonz/sources/toonz/xshcolumnviewer.cpp +++ b/toonz/sources/toonz/xshcolumnviewer.cpp @@ -578,15 +578,15 @@ const QPixmap &ColumnArea::Pixmaps::cameraStandTransparent() { return cameraStandTransparent; } const QPixmap &ColumnArea::Pixmaps::lock() { - static QPixmap lock = QPixmap(":Resources/x_lock.png"); + static QPixmap lock = svgToPixmap(":Resources/x_lock.svg"); return lock; } const QPixmap &ColumnArea::Pixmaps::sound() { - static QPixmap sound = QPixmap(":Resources/sound_header_off.png"); + static QPixmap sound = svgToPixmap(":Resources/sound_header_off.svg"); return sound; } const QPixmap &ColumnArea::Pixmaps::soundPlaying() { - static QPixmap soundPlaying = QPixmap(":Resources/sound_header_on.png"); + static QPixmap soundPlaying = svgToPixmap(":Resources/sound_header_on.svg"); return soundPlaying; } //----------------------------------------------------------------------------- @@ -1262,7 +1262,7 @@ void ColumnArea::drawPaletteColumnHead(QPainter &p, int col) { // AREA drawHeader.drawLock(); drawHeader.drawColumnName(); drawHeader.drawColumnNumber(); - static QPixmap iconPixmap(":Resources/palette_header.png"); + static QPixmap iconPixmap(svgToPixmap(":Resources/palette_header.svg")); drawHeader.drawThumbnail(iconPixmap); drawHeader.drawPegbarName(); drawHeader.drawParentHandleName(); @@ -1313,7 +1313,7 @@ void ColumnArea::drawSoundTextColumnHead(QPainter &p, int col) { // AREA drawHeader.drawLock(); drawHeader.drawColumnName(); drawHeader.drawColumnNumber(); - static QPixmap iconPixmap(":Resources/magpie.png"); + static QPixmap iconPixmap(svgToPixmap(":Resources/magpie.svg")); drawHeader.drawThumbnail(iconPixmap); drawHeader.drawPegbarName(); drawHeader.drawParentHandleName(); diff --git a/toonz/sources/toonz/xshnoteviewer.cpp b/toonz/sources/toonz/xshnoteviewer.cpp index 95df06d..c8c2b19 100644 --- a/toonz/sources/toonz/xshnoteviewer.cpp +++ b/toonz/sources/toonz/xshnoteviewer.cpp @@ -479,7 +479,7 @@ NoteArea::NoteArea(XsheetViewer *parent, Qt::WFlags flags) m_noteButton->setObjectName("ToolbarToolButton"); m_noteButton->setFixedSize(44, 26); m_noteButton->setIconSize(QSize(38, 20)); - QIcon addNoteIcon = createQIconPNG("newmemo"); + QIcon addNoteIcon = createQIcon("newmemo"); addNoteIcon.addFile(QString(":Resources/newmemo_disabled.svg"), QSize(), QIcon::Disabled); m_noteButton->setIcon(addNoteIcon); diff --git a/toonz/sources/toonzqt/CMakeLists.txt b/toonz/sources/toonzqt/CMakeLists.txt index ebfb04a..089a4fe 100644 --- a/toonz/sources/toonzqt/CMakeLists.txt +++ b/toonz/sources/toonzqt/CMakeLists.txt @@ -240,4 +240,4 @@ elseif(BUILD_ENV_UNIXLIKE) endif() endif() -target_link_libraries(toonzqt Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Network Qt5::OpenGL ${EXTRA_LIBS} ${GL_LIB}) +target_link_libraries(toonzqt Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Network Qt5::OpenGL Qt5::Svg ${EXTRA_LIBS} ${GL_LIB}) diff --git a/toonz/sources/toonzqt/Resources/audio.png b/toonz/sources/toonzqt/Resources/audio.png deleted file mode 100644 index e46cad6..0000000 Binary files a/toonz/sources/toonzqt/Resources/audio.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/audio.svg b/toonz/sources/toonzqt/Resources/audio.svg new file mode 100644 index 0000000..6be15d8 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/audio.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/broken.png b/toonz/sources/toonzqt/Resources/broken.png deleted file mode 100644 index 8f0ff7d..0000000 Binary files a/toonz/sources/toonzqt/Resources/broken.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/broken.svg b/toonz/sources/toonzqt/Resources/broken.svg new file mode 100644 index 0000000..a5be0d9 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/broken.svg @@ -0,0 +1,15 @@ + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/cleanup.png b/toonz/sources/toonzqt/Resources/cleanup.png deleted file mode 100644 index 530de60..0000000 Binary files a/toonz/sources/toonzqt/Resources/cleanup.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/cleanup.svg b/toonz/sources/toonzqt/Resources/cleanup.svg new file mode 100644 index 0000000..d53d97c --- /dev/null +++ b/toonz/sources/toonzqt/Resources/cleanup.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/delete.png b/toonz/sources/toonzqt/Resources/delete.png deleted file mode 100644 index 4d545cd..0000000 Binary files a/toonz/sources/toonzqt/Resources/delete.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/delete.svg b/toonz/sources/toonzqt/Resources/delete.svg new file mode 100644 index 0000000..25827fd --- /dev/null +++ b/toonz/sources/toonzqt/Resources/delete.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/delete_over.png b/toonz/sources/toonzqt/Resources/delete_over.png deleted file mode 100644 index eba2906..0000000 Binary files a/toonz/sources/toonzqt/Resources/delete_over.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/delete_over.svg b/toonz/sources/toonzqt/Resources/delete_over.svg new file mode 100644 index 0000000..8425c70 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/delete_over.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/dragpalette.png b/toonz/sources/toonzqt/Resources/dragpalette.png deleted file mode 100644 index 49852bb..0000000 Binary files a/toonz/sources/toonzqt/Resources/dragpalette.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/dragpalette.svg b/toonz/sources/toonzqt/Resources/dragpalette.svg new file mode 100644 index 0000000..1d8feab --- /dev/null +++ b/toonz/sources/toonzqt/Resources/dragpalette.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/dragpalette_over.png b/toonz/sources/toonzqt/Resources/dragpalette_over.png deleted file mode 100644 index 87e7903..0000000 Binary files a/toonz/sources/toonzqt/Resources/dragpalette_over.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/dragpalette_over.svg b/toonz/sources/toonzqt/Resources/dragpalette_over.svg new file mode 100644 index 0000000..4f97711 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/dragpalette_over.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folder_close.png b/toonz/sources/toonzqt/Resources/folder_close.png deleted file mode 100644 index 51f074e..0000000 Binary files a/toonz/sources/toonzqt/Resources/folder_close.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folder_close.svg b/toonz/sources/toonzqt/Resources/folder_close.svg new file mode 100644 index 0000000..f64a30e --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folder_close.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folder_close_off.png b/toonz/sources/toonzqt/Resources/folder_close_off.png deleted file mode 100644 index e277263..0000000 Binary files a/toonz/sources/toonzqt/Resources/folder_close_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folder_close_off.svg b/toonz/sources/toonzqt/Resources/folder_close_off.svg new file mode 100644 index 0000000..767ad66 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folder_close_off.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folder_open.png b/toonz/sources/toonzqt/Resources/folder_open.png deleted file mode 100644 index cabe5cf..0000000 Binary files a/toonz/sources/toonzqt/Resources/folder_open.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folder_open.svg b/toonz/sources/toonzqt/Resources/folder_open.svg new file mode 100644 index 0000000..d1c8990 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folder_open.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folder_open_off.png b/toonz/sources/toonzqt/Resources/folder_open_off.png deleted file mode 100644 index 9b2944f..0000000 Binary files a/toonz/sources/toonzqt/Resources/folder_open_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folder_open_off.svg b/toonz/sources/toonzqt/Resources/folder_open_off.svg new file mode 100644 index 0000000..a508447 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folder_open_off.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folderanim_close.png b/toonz/sources/toonzqt/Resources/folderanim_close.png deleted file mode 100644 index 7e9d2e9..0000000 Binary files a/toonz/sources/toonzqt/Resources/folderanim_close.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folderanim_close.svg b/toonz/sources/toonzqt/Resources/folderanim_close.svg new file mode 100644 index 0000000..c7b2310 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folderanim_close.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folderanim_close_off.png b/toonz/sources/toonzqt/Resources/folderanim_close_off.png deleted file mode 100644 index 292ee35..0000000 Binary files a/toonz/sources/toonzqt/Resources/folderanim_close_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folderanim_close_off.svg b/toonz/sources/toonzqt/Resources/folderanim_close_off.svg new file mode 100644 index 0000000..0964b21 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folderanim_close_off.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folderanim_open.png b/toonz/sources/toonzqt/Resources/folderanim_open.png deleted file mode 100644 index cffc64f..0000000 Binary files a/toonz/sources/toonzqt/Resources/folderanim_open.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folderanim_open.svg b/toonz/sources/toonzqt/Resources/folderanim_open.svg new file mode 100644 index 0000000..8203dda --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folderanim_open.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/folderanim_open_off.png b/toonz/sources/toonzqt/Resources/folderanim_open_off.png deleted file mode 100644 index 4f4b8a7..0000000 Binary files a/toonz/sources/toonzqt/Resources/folderanim_open_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/folderanim_open_off.svg b/toonz/sources/toonzqt/Resources/folderanim_open_off.svg new file mode 100644 index 0000000..6c56386 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/folderanim_open_off.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/keyframe_inbetween.png b/toonz/sources/toonzqt/Resources/keyframe_inbetween.png deleted file mode 100644 index 66cf16b..0000000 Binary files a/toonz/sources/toonzqt/Resources/keyframe_inbetween.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/keyframe_inbetween.svg b/toonz/sources/toonzqt/Resources/keyframe_inbetween.svg new file mode 100644 index 0000000..0e91540 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/keyframe_inbetween.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/keyframe_key.png b/toonz/sources/toonzqt/Resources/keyframe_key.png deleted file mode 100644 index a89469c..0000000 Binary files a/toonz/sources/toonzqt/Resources/keyframe_key.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/keyframe_key.svg b/toonz/sources/toonzqt/Resources/keyframe_key.svg new file mode 100644 index 0000000..1c9212c --- /dev/null +++ b/toonz/sources/toonzqt/Resources/keyframe_key.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/keyframe_modified.png b/toonz/sources/toonzqt/Resources/keyframe_modified.png deleted file mode 100644 index f6105ad..0000000 Binary files a/toonz/sources/toonzqt/Resources/keyframe_modified.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/keyframe_modified.svg b/toonz/sources/toonzqt/Resources/keyframe_modified.svg new file mode 100644 index 0000000..1961136 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/keyframe_modified.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/keyframe_noanim.png b/toonz/sources/toonzqt/Resources/keyframe_noanim.png deleted file mode 100644 index bb1f9ac..0000000 Binary files a/toonz/sources/toonzqt/Resources/keyframe_noanim.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/keyframe_noanim.svg b/toonz/sources/toonzqt/Resources/keyframe_noanim.svg new file mode 100644 index 0000000..2149814 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/keyframe_noanim.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/magpie.png b/toonz/sources/toonzqt/Resources/magpie.png deleted file mode 100644 index 94f6043..0000000 Binary files a/toonz/sources/toonzqt/Resources/magpie.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/magpie.svg b/toonz/sources/toonzqt/Resources/magpie.svg new file mode 100644 index 0000000..9e768d0 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/magpie.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/palette.png b/toonz/sources/toonzqt/Resources/palette.png deleted file mode 100644 index 1d397d1..0000000 Binary files a/toonz/sources/toonzqt/Resources/palette.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/palette.svg b/toonz/sources/toonzqt/Resources/palette.svg new file mode 100644 index 0000000..36878b7 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/palette.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/palettegizmo.png b/toonz/sources/toonzqt/Resources/palettegizmo.png deleted file mode 100644 index 191b9c1..0000000 Binary files a/toonz/sources/toonzqt/Resources/palettegizmo.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/palettegizmo.svg b/toonz/sources/toonzqt/Resources/palettegizmo.svg new file mode 100644 index 0000000..882b7b9 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/palettegizmo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/palettegizmo_over.png b/toonz/sources/toonzqt/Resources/palettegizmo_over.png deleted file mode 100644 index ce62b70..0000000 Binary files a/toonz/sources/toonzqt/Resources/palettegizmo_over.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/palettegizmo_over.svg b/toonz/sources/toonzqt/Resources/palettegizmo_over.svg new file mode 100644 index 0000000..4b0e89d --- /dev/null +++ b/toonz/sources/toonzqt/Resources/palettegizmo_over.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/param_off.png b/toonz/sources/toonzqt/Resources/param_off.png deleted file mode 100644 index 94a474a..0000000 Binary files a/toonz/sources/toonzqt/Resources/param_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/param_off.svg b/toonz/sources/toonzqt/Resources/param_off.svg new file mode 100644 index 0000000..5b65a60 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/param_off.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/param_on.png b/toonz/sources/toonzqt/Resources/param_on.png deleted file mode 100644 index 8ed1e65..0000000 Binary files a/toonz/sources/toonzqt/Resources/param_on.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/param_on.svg b/toonz/sources/toonzqt/Resources/param_on.svg new file mode 100644 index 0000000..8594c7d --- /dev/null +++ b/toonz/sources/toonzqt/Resources/param_on.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/paramanim_off.png b/toonz/sources/toonzqt/Resources/paramanim_off.png deleted file mode 100644 index 4e77fd6..0000000 Binary files a/toonz/sources/toonzqt/Resources/paramanim_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/paramanim_off.svg b/toonz/sources/toonzqt/Resources/paramanim_off.svg new file mode 100644 index 0000000..dc2537a --- /dev/null +++ b/toonz/sources/toonzqt/Resources/paramanim_off.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/paramanim_on.png b/toonz/sources/toonzqt/Resources/paramanim_on.png deleted file mode 100644 index ea76f2e..0000000 Binary files a/toonz/sources/toonzqt/Resources/paramanim_on.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/paramanim_on.svg b/toonz/sources/toonzqt/Resources/paramanim_on.svg new file mode 100644 index 0000000..1cbfc63 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/paramanim_on.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/plus.png b/toonz/sources/toonzqt/Resources/plus.png deleted file mode 100644 index 24fdaa9..0000000 Binary files a/toonz/sources/toonzqt/Resources/plus.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/plus.svg b/toonz/sources/toonzqt/Resources/plus.svg new file mode 100644 index 0000000..8221b09 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/plus.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/port_blue.png b/toonz/sources/toonzqt/Resources/port_blue.png deleted file mode 100644 index 7fa35da..0000000 Binary files a/toonz/sources/toonzqt/Resources/port_blue.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/port_blue.svg b/toonz/sources/toonzqt/Resources/port_blue.svg new file mode 100644 index 0000000..86be6cf --- /dev/null +++ b/toonz/sources/toonzqt/Resources/port_blue.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/port_blue_highlight.png b/toonz/sources/toonzqt/Resources/port_blue_highlight.png deleted file mode 100644 index 09a72fc..0000000 Binary files a/toonz/sources/toonzqt/Resources/port_blue_highlight.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/port_blue_highlight.svg b/toonz/sources/toonzqt/Resources/port_blue_highlight.svg new file mode 100644 index 0000000..7c17a30 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/port_blue_highlight.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/port_red.png b/toonz/sources/toonzqt/Resources/port_red.png deleted file mode 100644 index 45308ab..0000000 Binary files a/toonz/sources/toonzqt/Resources/port_red.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/port_red.svg b/toonz/sources/toonzqt/Resources/port_red.svg new file mode 100644 index 0000000..376f724 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/port_red.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/port_red_highlight.png b/toonz/sources/toonzqt/Resources/port_red_highlight.png deleted file mode 100644 index 219837a..0000000 Binary files a/toonz/sources/toonzqt/Resources/port_red_highlight.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/port_red_highlight.svg b/toonz/sources/toonzqt/Resources/port_red_highlight.svg new file mode 100644 index 0000000..be40cc5 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/port_red_highlight.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/saveas_off.png b/toonz/sources/toonzqt/Resources/saveas_off.png deleted file mode 100644 index c41cbde..0000000 Binary files a/toonz/sources/toonzqt/Resources/saveas_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/saveas_on.png b/toonz/sources/toonzqt/Resources/saveas_on.png deleted file mode 100644 index ad7cdb9..0000000 Binary files a/toonz/sources/toonzqt/Resources/saveas_on.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.png b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.png deleted file mode 100644 index 15aa9ba..0000000 Binary files a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.svg b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.svg new file mode 100644 index 0000000..331fd80 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_off.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.png b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.png deleted file mode 100644 index 67738ec..0000000 Binary files a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.svg b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.svg new file mode 100644 index 0000000..7d04230 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/schematic_thumbtoggle_on.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/spline_child_port.png b/toonz/sources/toonzqt/Resources/spline_child_port.png deleted file mode 100644 index 642191c..0000000 Binary files a/toonz/sources/toonzqt/Resources/spline_child_port.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/spline_child_port.svg b/toonz/sources/toonzqt/Resources/spline_child_port.svg new file mode 100644 index 0000000..8ca153a --- /dev/null +++ b/toonz/sources/toonzqt/Resources/spline_child_port.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.png b/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.png deleted file mode 100644 index 698d825..0000000 Binary files a/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.svg b/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.svg new file mode 100644 index 0000000..5fb5621 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/spline_child_port_disconnect.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/spline_parent_port.png b/toonz/sources/toonzqt/Resources/spline_parent_port.png deleted file mode 100644 index 79661b5..0000000 Binary files a/toonz/sources/toonzqt/Resources/spline_parent_port.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/spline_parent_port.svg b/toonz/sources/toonzqt/Resources/spline_parent_port.svg new file mode 100644 index 0000000..8fa7207 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/spline_parent_port.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/studiopalette.png b/toonz/sources/toonzqt/Resources/studiopalette.png deleted file mode 100644 index 475f9e6..0000000 Binary files a/toonz/sources/toonzqt/Resources/studiopalette.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/studiopalette.svg b/toonz/sources/toonzqt/Resources/studiopalette.svg new file mode 100644 index 0000000..cb8189b --- /dev/null +++ b/toonz/sources/toonzqt/Resources/studiopalette.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/tasklist.png b/toonz/sources/toonzqt/Resources/tasklist.png deleted file mode 100644 index 8330cb1..0000000 Binary files a/toonz/sources/toonzqt/Resources/tasklist.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/tasklist.svg b/toonz/sources/toonzqt/Resources/tasklist.svg new file mode 100644 index 0000000..1565337 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/tasklist.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/tmsg_error.png b/toonz/sources/toonzqt/Resources/tmsg_error.png deleted file mode 100644 index ad3c06e..0000000 Binary files a/toonz/sources/toonzqt/Resources/tmsg_error.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/tmsg_error.svg b/toonz/sources/toonzqt/Resources/tmsg_error.svg new file mode 100644 index 0000000..36c1f17 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/tmsg_error.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/tmsg_info.png b/toonz/sources/toonzqt/Resources/tmsg_info.png deleted file mode 100644 index 1c0b4b9..0000000 Binary files a/toonz/sources/toonzqt/Resources/tmsg_info.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/tmsg_info.svg b/toonz/sources/toonzqt/Resources/tmsg_info.svg new file mode 100644 index 0000000..8ec0510 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/tmsg_info.svg @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/tmsg_warning.png b/toonz/sources/toonzqt/Resources/tmsg_warning.png deleted file mode 100644 index ffc1b3b..0000000 Binary files a/toonz/sources/toonzqt/Resources/tmsg_warning.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/tmsg_warning.svg b/toonz/sources/toonzqt/Resources/tmsg_warning.svg new file mode 100644 index 0000000..88ce216 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/tmsg_warning.svg @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/toonz/sources/toonzqt/Resources/unknown.png b/toonz/sources/toonzqt/Resources/unknown.png deleted file mode 100644 index 67016f6..0000000 Binary files a/toonz/sources/toonzqt/Resources/unknown.png and /dev/null differ diff --git a/toonz/sources/toonzqt/Resources/unknown.svg b/toonz/sources/toonzqt/Resources/unknown.svg new file mode 100644 index 0000000..b46ffe1 --- /dev/null +++ b/toonz/sources/toonzqt/Resources/unknown.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/toonz/sources/toonzqt/flipconsole.cpp b/toonz/sources/toonzqt/flipconsole.cpp index 6afecf0..e078562 100644 --- a/toonz/sources/toonzqt/flipconsole.cpp +++ b/toonz/sources/toonzqt/flipconsole.cpp @@ -1063,7 +1063,7 @@ void FlipConsole::applyCustomizeMask() { void FlipConsole::createCustomizeMenu(bool withCustomWidget) { if (m_gadgetsMask & eCustomize) { - QIcon icon = createQIconPNG("options"); + QIcon icon = createQIcon("options"); QToolButton *button = new QToolButton(); button->setIcon(icon); button->setPopupMode(QToolButton::MenuButtonPopup); diff --git a/toonz/sources/toonzqt/functiontreeviewer.cpp b/toonz/sources/toonzqt/functiontreeviewer.cpp index 0cd2875..3275f0c 100644 --- a/toonz/sources/toonzqt/functiontreeviewer.cpp +++ b/toonz/sources/toonzqt/functiontreeviewer.cpp @@ -164,18 +164,18 @@ QVariant FunctionTreeModel::ChannelGroup::data(int role) const { bool active = isActive(); if (active) { - static QIcon folderAnimOpen(":Resources/folderanim_open.png"); - static QIcon folderAnimClose(":Resources/folderanim_close.png"); - static QIcon folderOpen(":Resources/folder_open.png"); - static QIcon folderClose(":Resources/folder_close.png"); + static QIcon folderAnimOpen(":Resources/folderanim_open.svg"); + static QIcon folderAnimClose(":Resources/folderanim_close.svg"); + static QIcon folderOpen(":Resources/folder_open.svg"); + static QIcon folderClose(":Resources/folder_close.svg"); return animated ? isOpen() ? folderAnimOpen : folderAnimClose : isOpen() ? folderOpen : folderClose; } else { - static QIcon folderAnimOpen(":Resources/folderanim_open_off.png"); - static QIcon folderAnimClose(":Resources/folderanim_close_off.png"); - static QIcon folderOpen(":Resources/folder_open_off.png"); - static QIcon folderClose(":Resources/folder_close_off.png"); + static QIcon folderAnimOpen(":Resources/folderanim_open_off.svg"); + static QIcon folderAnimClose(":Resources/folderanim_close_off.svg"); + static QIcon folderOpen(":Resources/folder_open_off.svg"); + static QIcon folderClose(":Resources/folder_close_off.svg"); return animated ? isOpen() ? folderAnimOpen : folderAnimClose : isOpen() ? folderOpen : folderClose; @@ -374,18 +374,18 @@ QVariant FxChannelGroup::data(int role) const { break; } if (isOneChildActive) { - static QIcon folderAnimOpen(":Resources/folderanim_open.png"); - static QIcon folderAnimClose(":Resources/folderanim_close.png"); - static QIcon folderOpen(":Resources/folder_open.png"); - static QIcon folderClose(":Resources/folder_close.png"); + static QIcon folderAnimOpen(":Resources/folderanim_open.svg"); + static QIcon folderAnimClose(":Resources/folderanim_close.svg"); + static QIcon folderOpen(":Resources/folder_open.svg"); + static QIcon folderClose(":Resources/folder_close.svg"); return isAnimated ? isOpen() ? folderAnimOpen : folderAnimClose : isOpen() ? folderOpen : folderClose; } else { - static QIcon folderAnimOpen(":Resources/folderanim_open_off.png"); - static QIcon folderAnimClose(":Resources/folderanim_close_off.png"); - static QIcon folderOpen(":Resources/folder_open_off.png"); - static QIcon folderClose(":Resources/folder_close_off.png"); + static QIcon folderAnimOpen(":Resources/folderanim_open_off.svg"); + static QIcon folderAnimClose(":Resources/folderanim_close_off.svg"); + static QIcon folderOpen(":Resources/folder_open_off.svg"); + static QIcon folderClose(":Resources/folder_close_off.svg"); return isAnimated ? isOpen() ? folderAnimOpen : folderAnimClose : isOpen() ? folderOpen : folderClose; @@ -580,10 +580,10 @@ bool FunctionTreeModel::Channel::isAnimated() const { QVariant FunctionTreeModel::Channel::data(int role) const { if (role == Qt::DecorationRole) { - static QIcon paramAnimOn(":Resources/paramanim_on.png"); - static QIcon paramAnimOff(":Resources/paramanim_off.png"); - static QIcon paramOn(":Resources/param_on.png"); - static QIcon paramOff(":Resources/param_off.png"); + static QIcon paramAnimOn(":Resources/paramanim_on.svg"); + static QIcon paramAnimOff(":Resources/paramanim_off.svg"); + static QIcon paramOn(":Resources/param_on.svg"); + static QIcon paramOff(":Resources/param_off.svg"); return m_param->hasKeyframes() ? isActive() ? paramAnimOn : paramAnimOff : isActive() ? paramOn : paramOff; diff --git a/toonz/sources/toonzqt/functionviewer.cpp b/toonz/sources/toonzqt/functionviewer.cpp index 6e07783..4122627 100644 --- a/toonz/sources/toonzqt/functionviewer.cpp +++ b/toonz/sources/toonzqt/functionviewer.cpp @@ -86,6 +86,7 @@ FunctionViewer::FunctionViewer(QWidget *parent, Qt::WFlags flags) //---- m_treeView->resize(150, m_treeView->size().height()); m_treeView->setMinimumWidth(0); + m_treeView->setIconSize(QSize(21, 17)); FunctionTreeModel *ftModel = dynamic_cast(m_treeView->model()); diff --git a/toonz/sources/toonzqt/fxschematicnode.cpp b/toonz/sources/toonzqt/fxschematicnode.cpp index ea47502..4b32ac1 100644 --- a/toonz/sources/toonzqt/fxschematicnode.cpp +++ b/toonz/sources/toonzqt/fxschematicnode.cpp @@ -110,12 +110,6 @@ int getInputPortIndex(TFxPort *port, TFx *fx) { } return -1; } - -int getDevPixRatio() { - static int devPixRatio = QApplication::desktop()->devicePixelRatio(); - return devPixRatio; -} - } // namespace //***************************************************** @@ -1402,9 +1396,9 @@ void FxSchematicPort::paint(QPainter *painter, case eFxGroupedInPort: { QRect sourceRect = scene()->views()[0]->matrix().mapRect(boundingRect()).toRect(); - QPixmap redPm = - QIcon(":Resources/fxport_red.svg").pixmap(sourceRect.size()); - sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), + static QIcon fxPortRedIcon(":Resources/fxport_red.svg"); + QPixmap redPm = fxPortRedIcon.pixmap(sourceRect.size()); + sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), sourceRect.height() * getDevPixRatio()); painter->drawPixmap(boundingRect(), redPm, sourceRect); } break; @@ -1413,9 +1407,9 @@ void FxSchematicPort::paint(QPainter *painter, case eFxGroupedOutPort: { QRect sourceRect = scene()->views()[0]->matrix().mapRect(boundingRect()).toRect(); - QPixmap bluePm = - QIcon(":Resources/fxport_blue.svg").pixmap(sourceRect.size()); - sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), + static QIcon fxPortBlueIcon(":Resources/fxport_blue.svg"); + QPixmap bluePm = fxPortBlueIcon.pixmap(sourceRect.size()); + sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), sourceRect.height() * getDevPixRatio()); painter->drawPixmap(boundingRect(), bluePm, sourceRect); FxSchematicDock *parentDock = diff --git a/toonz/sources/toonzqt/gutil.cpp b/toonz/sources/toonzqt/gutil.cpp index 5d2ff7b..6192875 100644 --- a/toonz/sources/toonzqt/gutil.cpp +++ b/toonz/sources/toonzqt/gutil.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include using namespace DVGui; @@ -71,9 +73,14 @@ QImage rasterToQImage(const TRasterP &ras, bool premultiplied, bool mirrored) { //----------------------------------------------------------------------------- -QPixmap rasterToQPixmap(const TRaster32P &ras, bool premultiplied) { - QPixmap pixmap; - return pixmap.fromImage(rasterToQImage(ras, premultiplied)); +QPixmap rasterToQPixmap(const TRaster32P &ras, bool premultiplied, + bool setDevPixRatio) { + QPixmap pixmap = QPixmap::fromImage(rasterToQImage(ras, premultiplied)); + if (setDevPixRatio) { + static int devPixRatio = QApplication::desktop()->devicePixelRatio(); + pixmap.setDevicePixelRatio(devPixRatio); + } + return pixmap; } //----------------------------------------------------------------------------- @@ -131,7 +138,9 @@ void drawArrow(QPainter &p, const QPointF a, const QPointF b, const QPointF c, QPixmap scalePixmapKeepingAspectRatio(QPixmap pixmap, QSize size, QColor color) { - if (pixmap.isNull() || pixmap.size() == size) return pixmap; + if (pixmap.isNull()) return pixmap; + if (pixmap.devicePixelRatio() > 1.0) size *= pixmap.devicePixelRatio(); + if (pixmap.size() == size) return pixmap; QPixmap scaledPixmap = pixmap.scaled(size.width(), size.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation); @@ -141,11 +150,60 @@ QPixmap scalePixmapKeepingAspectRatio(QPixmap pixmap, QSize size, painter.drawPixmap(double(size.width() - scaledPixmap.width()) * 0.5, double(size.height() - scaledPixmap.height()) * 0.5, scaledPixmap); + newPixmap.setDevicePixelRatio(pixmap.devicePixelRatio()); return newPixmap; } //----------------------------------------------------------------------------- +QPixmap svgToPixmap(const QString &svgFilePath, const QSize &size, + Qt::AspectRatioMode aspectRatioMode, QColor bgColor) { + static int devPixRatio = QApplication::desktop()->devicePixelRatio(); + QSvgRenderer svgRenderer(svgFilePath); + QSize pixmapSize; + QRectF renderRect; + if (size.isEmpty()) { + pixmapSize = svgRenderer.defaultSize() * devPixRatio; + renderRect = QRectF(QPointF(), QSizeF(pixmapSize)); + } else { + pixmapSize = size * devPixRatio; + if (aspectRatioMode == Qt::KeepAspectRatio || + aspectRatioMode == Qt::KeepAspectRatioByExpanding) { + QSize imgSize = svgRenderer.defaultSize(); + QPointF scaleFactor((float)pixmapSize.width() / (float)imgSize.width(), + (float)pixmapSize.height() / (float)imgSize.height()); + float factor = (aspectRatioMode == Qt::KeepAspectRatio) + ? std::min(scaleFactor.x(), scaleFactor.y()) + : std::max(scaleFactor.x(), scaleFactor.y()); + QSizeF renderSize(factor * (float)imgSize.width(), + factor * (float)imgSize.height()); + QPointF topLeft( + ((float)pixmapSize.width() - renderSize.width()) * 0.5f, + ((float)pixmapSize.height() - renderSize.height()) * 0.5f); + renderRect = QRectF(topLeft, renderSize); + } else { // Qt::IgnoreAspectRatio: + renderRect = QRectF(QPointF(), QSizeF(pixmapSize)); + } + } + QPixmap pixmap(pixmapSize); + QPainter painter; + pixmap.fill(bgColor); + painter.begin(&pixmap); + svgRenderer.render(&painter, renderRect); + painter.end(); + pixmap.setDevicePixelRatio(devPixRatio); + return pixmap; +} + +//----------------------------------------------------------------------------- + +int getDevPixRatio() { + static int devPixRatio = QApplication::desktop()->devicePixelRatio(); + return devPixRatio; +} + +//----------------------------------------------------------------------------- + QIcon createQIcon(const char *iconSVGName) { QString normal = QString(":Resources/") + iconSVGName + ".svg"; QString click = QString(":Resources/") + iconSVGName + "_click.svg"; @@ -153,8 +211,14 @@ QIcon createQIcon(const char *iconSVGName) { QIcon icon; icon.addFile(normal, QSize(), QIcon::Normal, QIcon::Off); - icon.addFile(click, QSize(), QIcon::Normal, QIcon::On); - icon.addFile(over, QSize(), QIcon::Active); + if (QFile::exists(click)) + icon.addFile(click, QSize(), QIcon::Normal, QIcon::On); + else + icon.addFile(normal, QSize(), QIcon::Normal, QIcon::On); + if (QFile::exists(over)) + icon.addFile(over, QSize(), QIcon::Active); + else + icon.addFile(normal, QSize(), QIcon::Active); return icon; } diff --git a/toonz/sources/toonzqt/histogram.cpp b/toonz/sources/toonzqt/histogram.cpp index d8ff410..05814d7 100644 --- a/toonz/sources/toonzqt/histogram.cpp +++ b/toonz/sources/toonzqt/histogram.cpp @@ -10,6 +10,7 @@ #include #include "toonzqt/histogram.h" +#include "toonzqt/gutil.h" const int HistogramGraph::drawMargin = 10; @@ -511,13 +512,7 @@ Histogram::Histogram(QWidget *parent) : QWidget(parent) { upperLayout->addWidget(m_channelsListBox); upperLayout->addStretch(1); - QIcon icon; - - QString normal = QString(":Resources/histograms.png"); - QString click = QString(":Resources/histograms_over.png"); - - icon.addFile(normal, QSize(), QIcon::Normal, QIcon::Off); - icon.addFile(click, QSize(), QIcon::Normal, QIcon::On); + QIcon icon = createQIcon("histograms"); QPushButton *logScaleButton = new QPushButton(icon, "", this); logScaleButton->setToolTip(tr("Logarithmic Scale")); diff --git a/toonz/sources/toonzqt/icongenerator.cpp b/toonz/sources/toonzqt/icongenerator.cpp index 7568194..92c3e97 100644 --- a/toonz/sources/toonzqt/icongenerator.cpp +++ b/toonz/sources/toonzqt/icongenerator.cpp @@ -64,7 +64,8 @@ typedef std::set::iterator IconIterator; // Returns true if the image request was already submitted. bool getIcon(const std::string &iconName, QPixmap &pix, - TXshSimpleLevel *simpleLevel = 0) { + TXshSimpleLevel *simpleLevel = 0, + TDimension standardSize = TDimension(0, 0)) { IconIterator it; it = iconsMap.find(iconName); @@ -107,7 +108,17 @@ bool getIcon(const std::string &iconName, QPixmap &pix, } assert(!(TRasterGR8P)img->getRaster()); const TRaster32P &ras = img->getRaster(); - pix = rasterToQPixmap(ras, false); + bool isHighDpi = false; + // If the icon raster obtained in higher resolution than the standard + // icon size, it may be icon displayed in high dpi monitors. + // In such case set the device pixel ratio to the pixmap. + // Note that the humbnails of regular levels are standardsize even if + // they are displayed in high dpi monitors for now. + if (standardSize != TDimension(0, 0) && + ras->getSize().lx > standardSize.lx && + ras->getSize().ly > standardSize.ly) + isHighDpi = true; + pix = rasterToQPixmap(ras, false, isHighDpi); return true; } @@ -1146,7 +1157,7 @@ void FileIconRenderer::run() { iconRaster = IconGenerator::generateVectorFileIcon(m_path, iconSize, m_fid); else if (type == "tpl") { - QImage palette(":Resources/paletteicon.png"); + QImage palette(":Resources/paletteicon.svg"); setIcon(rasterFromQImage(palette)); return; } else if (type == "tzp") { @@ -1154,24 +1165,30 @@ void FileIconRenderer::run() { setIcon(rasterFromQImage(palette)); return; } else if (type == "svg") { - QImage palette(":Resources/svg.png"); - setIcon(rasterFromQImage(palette)); + QPixmap palette(svgToPixmap(":Resources/svg.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(palette)); return; } else if (type == "tzu") { QImage palette(":Resources/tzuicon.png"); setIcon(rasterFromQImage(palette)); return; } else if (TFileType::getInfo(m_path) == TFileType::AUDIO_LEVEL) { - QImage loudspeaker(":Resources/audio.png"); - setIcon(rasterFromQImage(loudspeaker)); + QPixmap loudspeaker(svgToPixmap(":Resources/audio.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(loudspeaker)); return; } else if (type == "scr") { QImage screensaver(":Resources/savescreen.png"); setIcon(rasterFromQImage(screensaver)); return; } else if (type == "psd") { - QImage psdPath(":Resources/psd.png"); - setIcon(rasterFromQImage(psdPath)); + QPixmap psdPath(svgToPixmap(":Resources/psd.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(psdPath)); return; } else if (type == "mesh") iconRaster = IconGenerator::generateMeshFileIcon(m_path, iconSize, m_fid); @@ -1179,24 +1196,34 @@ void FileIconRenderer::run() { iconRaster = IconGenerator::generateRasterFileIcon(m_path, iconSize, m_fid); else if (type == "mpath") { - QImage motionPath(":Resources/motionpath.png"); - setIcon(rasterFromQImage(motionPath)); + QPixmap motionPath(svgToPixmap(":Resources/motionpath_fileicon.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(motionPath)); return; } else if (type == "curve") { - QImage motionPath(":Resources/curve.png"); - setIcon(rasterFromQImage(motionPath)); + QPixmap motionPath(svgToPixmap(":Resources/curve.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(motionPath)); return; } else if (type == "cln") { - QImage motionPath(":Resources/cleanup.png"); - setIcon(rasterFromQImage(motionPath)); + QPixmap motionPath(svgToPixmap(":Resources/cleanup.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(motionPath)); return; } else if (type == "tnzbat") { - QImage motionPath(":Resources/tasklist.png"); - setIcon(rasterFromQImage(motionPath)); + QPixmap motionPath(svgToPixmap(":Resources/tasklist.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(motionPath)); return; } else if (type == "tls") { - QImage magpie(":Resources/magpie.png"); - setIcon(rasterFromQImage(magpie)); + QPixmap magpie(svgToPixmap(":Resources/magpie.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(magpie)); return; } else if (type == "js") { QImage script(":Resources/scripticon.png"); @@ -1205,22 +1232,30 @@ void FileIconRenderer::run() { } else { - QImage unknown(":Resources/unknown.png"); - setIcon(rasterFromQImage(unknown)); + QPixmap unknown(svgToPixmap(":Resources/unknown.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(unknown)); return; } if (!iconRaster) { - QImage broken(":Resources/broken.png"); - setIcon(rasterFromQImage(broken)); + QPixmap broken(svgToPixmap(":Resources/broken.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(broken)); return; } setIcon(iconRaster); } catch (const TImageVersionException &) { - QImage unknown(":Resources/unknown.png"); - setIcon(rasterFromQImage(unknown)); + QPixmap unknown(svgToPixmap(":Resources/unknown.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(unknown)); } catch (...) { - QImage broken(":Resources/broken.png"); - setIcon(rasterFromQImage(broken)); + QPixmap broken(svgToPixmap(":Resources/broken.svg", + QSize(iconSize.lx, iconSize.ly), + Qt::KeepAspectRatio)); + setIcon(rasterFromQPixmap(broken)); } } @@ -1541,9 +1576,12 @@ QPixmap IconGenerator::getIcon(const TFilePath &path, const TFrameId &fid) { std::string id = FileIconRenderer::getId(path, fid); QPixmap pix; - if (::getIcon(id, pix)) return pix; + TDimension fileIconSize(80, 60); + // Here the fileIconSize is input in order to check if the icon is obtained + // with high-dpi (i.e. devPixRatio > 1.0). + if (::getIcon(id, pix, 0, fileIconSize)) return pix; - addTask(id, new FileIconRenderer(TDimension(80, 60), path, fid)); + addTask(id, new FileIconRenderer(fileIconSize, path, fid)); return QPixmap(); } diff --git a/toonz/sources/toonzqt/paletteviewergui.cpp b/toonz/sources/toonzqt/paletteviewergui.cpp index 9919e92..b2e01cf 100644 --- a/toonz/sources/toonzqt/paletteviewergui.cpp +++ b/toonz/sources/toonzqt/paletteviewergui.cpp @@ -1612,11 +1612,13 @@ void PaletteIconWidget::paintEvent(QPaintEvent *) { QPainter p(this); if (m_isOver) { - static QPixmap dragPaletteIconPixmapOver(":Resources/dragpalette_over.png"); - p.drawPixmap(5, 2, dragPaletteIconPixmapOver); + static QPixmap dragPaletteIconPixmapOver( + svgToPixmap(":Resources/dragpalette_over.svg")); + p.drawPixmap(5, 1, dragPaletteIconPixmapOver); } else { - static QPixmap dragPaletteIconPixmap(":Resources/dragpalette.png"); - p.drawPixmap(5, 2, dragPaletteIconPixmap); + static QPixmap dragPaletteIconPixmap( + svgToPixmap(":Resources/dragpalette.svg")); + p.drawPixmap(5, 1, dragPaletteIconPixmap); } } diff --git a/toonz/sources/toonzqt/paramfield.cpp b/toonz/sources/toonzqt/paramfield.cpp index ecfdd97..5c899ec 100644 --- a/toonz/sources/toonzqt/paramfield.cpp +++ b/toonz/sources/toonzqt/paramfield.cpp @@ -659,16 +659,19 @@ void ParamFieldKeyToggle::paintEvent(QPaintEvent *e) { switch (m_status) { case NOT_ANIMATED: - p.drawPixmap(rect(), QPixmap(":Resources/keyframe_noanim.png")); + p.drawPixmap(rect(), + QPixmap(svgToPixmap(":Resources/keyframe_noanim.svg"))); break; case KEYFRAME: - p.drawPixmap(rect(), QPixmap(":Resources/keyframe_key.png")); + p.drawPixmap(rect(), QPixmap(svgToPixmap(":Resources/keyframe_key.svg"))); break; case MODIFIED: - p.drawPixmap(rect(), QPixmap(":Resources/keyframe_modified.png")); + p.drawPixmap(rect(), + QPixmap(svgToPixmap(":Resources/keyframe_modified.svg"))); break; default: - p.drawPixmap(rect(), QPixmap(":Resources/keyframe_inbetween.png")); + p.drawPixmap(rect(), + QPixmap(svgToPixmap(":Resources/keyframe_inbetween.svg"))); break; } if (m_highlighted) { diff --git a/toonz/sources/toonzqt/schematicnode.cpp b/toonz/sources/toonzqt/schematicnode.cpp index 620f83f..a348e03 100644 --- a/toonz/sources/toonzqt/schematicnode.cpp +++ b/toonz/sources/toonzqt/schematicnode.cpp @@ -11,8 +11,11 @@ #include #include #include +#include #include "tundo.h" #include "toonzqt/menubarcommand.h" +#include "toonzqt/gutil.h" + //======================================================== // // StageSchematicName @@ -122,13 +125,18 @@ QRectF SchematicThumbnailToggle::boundingRect() const { void SchematicThumbnailToggle::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - QPixmap onPixmap(":Resources/schematic_thumbtoggle_on.png"); - QPixmap offPixmap(":Resources/schematic_thumbtoggle_off.png"); QRect rect(3, 3, 8, 8); - if (m_isDown) { - painter->drawPixmap(rect, offPixmap); - } else - painter->drawPixmap(rect, onPixmap); + QRect sourceRect = scene()->views()[0]->matrix().mapRect(rect); + static QIcon onIcon(":Resources/schematic_thumbtoggle_on.svg"); + static QIcon offIcon(":Resources/schematic_thumbtoggle_off.svg"); + QPixmap pixmap; + if (m_isDown) + pixmap = offIcon.pixmap(sourceRect.size()); + else + pixmap = onIcon.pixmap(sourceRect.size()); + sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), + sourceRect.height() * getDevPixRatio()); + painter->drawPixmap(rect, pixmap, sourceRect); } //-------------------------------------------------------- diff --git a/toonz/sources/toonzqt/stageschematicnode.cpp b/toonz/sources/toonzqt/stageschematicnode.cpp index 5215fa2..9527d77 100644 --- a/toonz/sources/toonzqt/stageschematicnode.cpp +++ b/toonz/sources/toonzqt/stageschematicnode.cpp @@ -816,7 +816,7 @@ StageSchematicNodePort::~StageSchematicNodePort() {} //-------------------------------------------------------- QRectF StageSchematicNodePort::boundingRect() const { - return QRectF(0, 0, 14, 12); + return QRectF(0, 0, 18, 18); } //-------------------------------------------------------- @@ -840,17 +840,26 @@ void StageSchematicNodePort::paint(QPainter *painter, if (text.size() > 1 && text.at(0) == 'H') text.remove("H"); painter->drawText(boundingRect(), text, textOption); } else { - QPixmap redPm = QPixmap(":Resources/port_red.png"); - QPixmap redPm_HL = QPixmap(":Resources/port_red_highlight.png"); - QPixmap bluePm = QPixmap(":Resources/port_blue.png"); - QPixmap bluePm_HL = QPixmap(":Resources/port_blue_highlight.png"); - - if (getType() == eStageParentPort || getType() == eStageParentGroupPort) - painter->drawPixmap(QRect(0, 0, 18, 18), - (isHighlighted()) ? bluePm_HL : bluePm); - else - painter->drawPixmap(QRect(0, 0, 18, 18), - (isHighlighted()) ? redPm_HL : redPm); + QRect imgRect(2, 2, 14, 14); + QRect sourceRect = scene->views()[0]->matrix().mapRect(imgRect); + QPixmap pixmap; + + if (getType() == eStageParentPort || getType() == eStageParentGroupPort) { + if (isHighlighted()) + pixmap = QIcon(":Resources/port_blue_highlight.svg") + .pixmap(sourceRect.size()); + else + pixmap = QIcon(":Resources/port_blue.svg").pixmap(sourceRect.size()); + } else { + if (isHighlighted()) + pixmap = QIcon(":Resources/port_red_highlight.svg") + .pixmap(sourceRect.size()); + else + pixmap = QIcon(":Resources/port_red.svg").pixmap(sourceRect.size()); + } + sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), + sourceRect.height() * getDevPixRatio()); + painter->drawPixmap(imgRect, pixmap, sourceRect); } } @@ -989,22 +998,26 @@ QRectF StageSchematicSplinePort::boundingRect() const { void StageSchematicSplinePort::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - // ChildPm : connected to the pegbar - QPixmap childPm = QPixmap(":Resources/spline_child_port.png"); - QPixmap childPm_disconnect = - QPixmap(":Resources/spline_child_port_disconnect.png"); - // ParentPm : connected to the spline - QPixmap parentPm = QPixmap(":Resources/spline_parent_port.png"); - - QRect rect(2, 0, 12, 6); + QRect rect(0, 0, 16, 8); + QRect sourceRect = scene()->views()[0]->matrix().mapRect(rect); + QPixmap pixmap; if (!m_parent->isParentPort()) { - if (getLinkCount() > 0) - painter->drawPixmap(rect, childPm); - else - painter->drawPixmap(rect, childPm_disconnect); - } else - painter->drawPixmap(rect.translated(0, 2), parentPm); + if (getLinkCount() > 0) { + static QIcon splineChildIcon(":Resources/spline_child_port.svg"); + pixmap = splineChildIcon.pixmap(sourceRect.size()); + } else { + static QIcon splineChildDisconIcon( + ":Resources/spline_child_port_disconnect.svg"); + pixmap = splineChildDisconIcon.pixmap(sourceRect.size()); + } + } else { + static QIcon splineParentIcon(":Resources/spline_parent_port.svg"); + pixmap = splineParentIcon.pixmap(sourceRect.size()); + } + sourceRect = QRect(0, 0, sourceRect.width() * getDevPixRatio(), + sourceRect.height() * getDevPixRatio()); + painter->drawPixmap(rect, pixmap, sourceRect); } //-------------------------------------------------------- diff --git a/toonz/sources/toonzqt/studiopaletteviewer.cpp b/toonz/sources/toonzqt/studiopaletteviewer.cpp index 1ba4e37..1203b96 100644 --- a/toonz/sources/toonzqt/studiopaletteviewer.cpp +++ b/toonz/sources/toonzqt/studiopaletteviewer.cpp @@ -110,14 +110,14 @@ StudioPaletteTreeViewer::StudioPaletteTreeViewer( QList paletteItems; - QString open = QString(":Resources/folder_close.png"); - QString close = QString(":Resources/folder_open.png"); + QString open = QString(":Resources/folder_close.svg"); + QString close = QString(":Resources/folder_open.svg"); m_folderIcon.addFile(close, QSize(21, 17), QIcon::Normal, QIcon::On); m_folderIcon.addFile(open, QSize(21, 17), QIcon::Normal, QIcon::Off); - QString levelPaletteIcon = QString(":Resources/palette.png"); + QString levelPaletteIcon = QString(":Resources/palette.svg"); m_levelPaletteIcon.addPixmap(levelPaletteIcon, QIcon::Normal, QIcon::On); - QString studioPaletteIcon = QString(":Resources/studiopalette.png"); + QString studioPaletteIcon = QString(":Resources/studiopalette.svg"); m_studioPaletteIcon.addPixmap(studioPaletteIcon, QIcon::Normal, QIcon::On); StudioPalette *studioPalette = StudioPalette::instance(); diff --git a/toonz/sources/toonzqt/styleeditor.cpp b/toonz/sources/toonzqt/styleeditor.cpp index cebf9bd..ae5a5f3 100644 --- a/toonz/sources/toonzqt/styleeditor.cpp +++ b/toonz/sources/toonzqt/styleeditor.cpp @@ -2196,8 +2196,9 @@ private: static std::vector m_brushes; public: - MyPaintBrushStyleChooserPage(QWidget *parent = 0) : StyleChooserPage(parent) - { m_chipSize = QSize(64, 64); } + MyPaintBrushStyleChooserPage(QWidget *parent = 0) : StyleChooserPage(parent) { + m_chipSize = QSize(64, 64); + } bool loadIfNeeded() override { static bool m_loaded = false; @@ -2209,15 +2210,16 @@ public: return false; } - int getChipCount() const override - { return m_brushes.size() + 1; } + int getChipCount() const override { return m_brushes.size() + 1; } static void loadItems(); void drawChip(QPainter &p, QRect rect, int index) override { assert(0 <= index && index <= (int)m_brushes.size()); static QImage noStyleImage(":Resources/no_mypaintbrush.png"); - p.drawImage(rect, index == 0 ? noStyleImage : rasterToQImage(m_brushes[index-1].getPreview())); + p.drawImage(rect, index == 0 + ? noStyleImage + : rasterToQImage(m_brushes[index - 1].getPreview())); } void onSelect(int index) override { @@ -2226,7 +2228,7 @@ public: if (index == 0) { emit styleSelected(noStyle); } else { - emit styleSelected(m_brushes[index-1]); + emit styleSelected(m_brushes[index - 1]); } } @@ -2239,9 +2241,8 @@ public: int index = posToIndex(pos); if (index == 0) { toolTip = tr("Plain color"); - } else - if (index > 0 && index <= (int)m_brushes.size()) { - toolTip = m_brushes[index-1].getPath().getQString(); + } else if (index > 0 && index <= (int)m_brushes.size()) { + toolTip = m_brushes[index - 1].getPath().getQString(); } QToolTip::showText(helpEvent->globalPos(), toolTip); e->accept(); @@ -2261,11 +2262,11 @@ void MyPaintBrushStyleChooserPage::loadItems() { std::set brushFiles; TFilePathSet dirs = TMyPaintBrushStyle::getBrushesDirs(); - for(TFilePathSet::iterator i = dirs.begin(); i != dirs.end(); ++i) { + for (TFilePathSet::iterator i = dirs.begin(); i != dirs.end(); ++i) { TFileStatus fs(*i); if (fs.doesExist() && fs.isDirectory()) { TFilePathSet files = TSystem::readDirectoryTree(*i, false, true); - for(TFilePathSet::iterator j = files.begin(); j != files.end(); ++j) + for (TFilePathSet::iterator j = files.begin(); j != files.end(); ++j) if (j->getType() == TMyPaintBrushStyle::getBrushType()) brushFiles.insert(*j - *i); } @@ -2273,7 +2274,8 @@ void MyPaintBrushStyleChooserPage::loadItems() { // reserve memory to avoid reallocation m_brushes.reserve(brushFiles.size()); - for(std::set::iterator i = brushFiles.begin(); i != brushFiles.end(); ++i) + for (std::set::iterator i = brushFiles.begin(); + i != brushFiles.end(); ++i) m_brushes.push_back(TMyPaintBrushStyle(*i)); } @@ -2691,7 +2693,7 @@ void SettingsPage::setStyle(const TColorStyleP &editedStyle) { if (m_editedStyle->hasParamDefault(p)) { QPushButton *pushButton = new QPushButton; pushButton->setToolTip(tr("Reset to default")); - pushButton->setIcon(createQIconPNG("delete")); + pushButton->setIcon(createQIcon("delete")); m_paramsLayout->addWidget(pushButton, p, 2); ret = QObject::connect(pushButton, SIGNAL(clicked(bool)), this, SLOT(onValueReset())) && @@ -2799,10 +2801,9 @@ void SettingsPage::onAutofillChanged() { int SettingsPage::getParamIndex(const QWidget *widget) { int p, pCount = m_paramsLayout->rowCount(); for (p = 0; p != pCount; ++p) - for(int c = 0; c < 3; ++c) + for (int c = 0; c < 3; ++c) if (QLayoutItem *item = m_paramsLayout->itemAtPosition(p, c)) - if (item->widget() == widget) - return p; + if (item->widget() == widget) return p; return -1; } @@ -2990,42 +2991,30 @@ StyleEditor::StyleEditor(PaletteController *paletteController, QWidget *parent) /* ------- signal-slot connections ------- */ bool ret = true; - ret = ret && connect( m_styleBar, - SIGNAL(currentChanged(int)), - this, - SLOT(setPage(int)) ); - ret = ret && connect( m_colorParameterSelector, - SIGNAL(colorParamChanged()), - this, - SLOT(onColorParamChanged()) ); - ret = ret && connect( m_textureStylePage, - SIGNAL(styleSelected(const TColorStyle &)), - this, - SLOT(selectStyle(const TColorStyle &))); - ret = ret && connect( m_specialStylePage, - SIGNAL(styleSelected(const TColorStyle &)), - this, - SLOT(selectStyle(const TColorStyle &)) ); - ret = ret && connect( m_customStylePage, - SIGNAL(styleSelected(const TColorStyle &)), - this, - SLOT(selectStyle(const TColorStyle &)) ); - ret = ret && connect( m_vectorBrushesStylePage, - SIGNAL(styleSelected(const TColorStyle &)), - this, - SLOT(selectStyle(const TColorStyle &)) ); - ret = ret && connect( m_mypaintBrushesStylePage, - SIGNAL(styleSelected(const TColorStyle &)), - this, - SLOT(selectStyle(const TColorStyle &)) ); - ret = ret && connect( m_settingsPage, - SIGNAL(paramStyleChanged(bool)), - this, - SLOT(onParamStyleChanged(bool)) ); - ret = ret && connect( m_plainColorPage, - SIGNAL(colorChanged(const ColorModel &, bool)), - this, - SLOT(onColorChanged(const ColorModel &, bool)) ); + ret = ret && connect(m_styleBar, SIGNAL(currentChanged(int)), this, + SLOT(setPage(int))); + ret = ret && connect(m_colorParameterSelector, SIGNAL(colorParamChanged()), + this, SLOT(onColorParamChanged())); + ret = ret && + connect(m_textureStylePage, SIGNAL(styleSelected(const TColorStyle &)), + this, SLOT(selectStyle(const TColorStyle &))); + ret = ret && + connect(m_specialStylePage, SIGNAL(styleSelected(const TColorStyle &)), + this, SLOT(selectStyle(const TColorStyle &))); + ret = ret && + connect(m_customStylePage, SIGNAL(styleSelected(const TColorStyle &)), + this, SLOT(selectStyle(const TColorStyle &))); + ret = ret && connect(m_vectorBrushesStylePage, + SIGNAL(styleSelected(const TColorStyle &)), this, + SLOT(selectStyle(const TColorStyle &))); + ret = ret && connect(m_mypaintBrushesStylePage, + SIGNAL(styleSelected(const TColorStyle &)), this, + SLOT(selectStyle(const TColorStyle &))); + ret = ret && connect(m_settingsPage, SIGNAL(paramStyleChanged(bool)), this, + SLOT(onParamStyleChanged(bool))); + ret = ret && connect(m_plainColorPage, + SIGNAL(colorChanged(const ColorModel &, bool)), this, + SLOT(onColorChanged(const ColorModel &, bool))); assert(ret); /* ------- initial conditions ------- */ diff --git a/toonz/sources/toonzqt/stylenameeditor.cpp b/toonz/sources/toonzqt/stylenameeditor.cpp index 6b20c8f..41528ff 100644 --- a/toonz/sources/toonzqt/stylenameeditor.cpp +++ b/toonz/sources/toonzqt/stylenameeditor.cpp @@ -116,7 +116,7 @@ void WordButton::contextMenuEvent(QContextMenuEvent* event) { AddWordButton::AddWordButton(const int col, QWidget* parent) : WordButton(tr("New"), parent), m_column(col) { // setFixedSize(23, 23); - setIcon(QIcon(":Resources/plus.png")); + setIcon(QIcon(":Resources/plus.svg")); setIconSize(QSize(16, 16)); setToolTip(tr("Add New Word for %1").arg(columnLabel[col])); } diff --git a/toonz/sources/toonzqt/tmessageviewer.cpp b/toonz/sources/toonzqt/tmessageviewer.cpp index 70b0ef6..e5133c3 100644 --- a/toonz/sources/toonzqt/tmessageviewer.cpp +++ b/toonz/sources/toonzqt/tmessageviewer.cpp @@ -97,9 +97,9 @@ TMessageRepository *TMessageRepository::instance() { void TMessageRepository::messageReceived(int type, const QString &message) { if (gRedIcon.isNull()) { - gRedIcon = QIcon(":Resources/tmsg_error.png"); - gYellowIcon = QIcon(":Resources/tmsg_warning.png"); - gGreenIcon = QIcon(":Resources/tmsg_info.png"); + gRedIcon = QIcon(":Resources/tmsg_error.svg"); + gYellowIcon = QIcon(":Resources/tmsg_warning.svg"); + gGreenIcon = QIcon(":Resources/tmsg_info.svg"); } switch (type) { diff --git a/toonz/sources/toonzqt/toonzqt.qrc b/toonz/sources/toonzqt/toonzqt.qrc index 77c149f..86754c5 100644 --- a/toonz/sources/toonzqt/toonzqt.qrc +++ b/toonz/sources/toonzqt/toonzqt.qrc @@ -16,13 +16,13 @@ Resources/camerastand_toggle_transp.png Resources/centerselection_off.svg Resources/centerselection_on.svg - Resources/cleanup.png + Resources/cleanup.svg Resources/custom_off.svg Resources/custom_on.svg - Resources/delete.png - Resources/delete_over.png - Resources/dragpalette.png - Resources/dragpalette_over.png + Resources/delete.svg + Resources/delete_over.svg + Resources/dragpalette.svg + Resources/dragpalette_over.svg Resources/fit_off.svg Resources/fit_on.svg Resources/fx_off.svg @@ -31,21 +31,21 @@ Resources/icon.png Resources/italic_off.png Resources/italic_on.png - Resources/folder_close_off.png - Resources/folder_open_off.png - Resources/folderanim_close_off.png - Resources/folderanim_open_off.png - Resources/folder_close.png - Resources/folder_open.png - Resources/folderanim_close.png - Resources/folderanim_open.png + Resources/folder_close_off.svg + Resources/folder_open_off.svg + Resources/folderanim_close_off.svg + Resources/folderanim_open_off.svg + Resources/folder_close.svg + Resources/folder_open.svg + Resources/folderanim_close.svg + Resources/folderanim_open.svg Resources/key_no.svg Resources/key_no_over.svg Resources/key_partial.svg Resources/key_partial_over.svg Resources/key_total.svg Resources/key_total_over.svg - Resources/magpie.png + Resources/magpie.svg Resources/maximizenodes_off.svg Resources/maximizenodes_on.svg Resources/minimizenodes_off.svg @@ -68,15 +68,15 @@ Resources/options_over.svg Resources/output_off.svg Resources/output_on.svg - Resources/palette.png + Resources/palette.svg Resources/palette_add_color.bmp - Resources/palette_tabicon.png - Resources/palettegizmo.png - Resources/palettegizmo_over.png - Resources/param_off.png - Resources/param_on.png - Resources/paramanim_off.png - Resources/paramanim_on.png + Resources/palette_tabicon.png + Resources/palettegizmo.svg + Resources/palettegizmo_over.svg + Resources/param_off.svg + Resources/param_on.svg + Resources/paramanim_off.svg + Resources/paramanim_on.svg Resources/pegbar_off.svg Resources/pegbar_on.svg Resources/plaincolor_off.svg @@ -110,8 +110,6 @@ Resources/save_click.svg Resources/savepalette_over.png Resources/save_over.svg - Resources/saveas_on.png - Resources/saveas_off.png Resources/schematic_spin_arrows.svg Resources/schematic_spline_aim_rhomb.svg Resources/schematic_spline_aim_square.svg @@ -131,7 +129,7 @@ Resources/special_on.svg Resources/swap_off.svg Resources/swap_on.svg - Resources/tasklist.png + Resources/tasklist.svg Resources/text_edit_button.png Resources/texture_off.svg Resources/texture_on.svg @@ -141,15 +139,15 @@ Resources/viewcamera_off.svg Resources/viewcamera_on.svg Resources/viewcamera_over.svg - Resources/unknown.png - Resources/audio.png - Resources/broken.png + Resources/unknown.svg + Resources/audio.svg + Resources/broken.svg Resources/opacitycheck_off.svg Resources/opacitycheck_on.svg Resources/opacitycheck_over.svg - Resources/tmsg_info.png - Resources/tmsg_error.png - Resources/tmsg_warning.png + Resources/tmsg_info.svg + Resources/tmsg_error.svg + Resources/tmsg_warning.svg Resources/lockpalette_off.svg Resources/lockpalette_on.svg Resources/lockpalette_over.svg @@ -157,7 +155,7 @@ Resources/savepalette_on.svg Resources/savepaletteas_off.svg Resources/savepaletteas_on.svg - Resources/studiopalette.png + Resources/studiopalette.svg Resources/grad_r.png Resources/grad_g.png Resources/grad_b.png @@ -167,13 +165,13 @@ Resources/h_chandleCenter.png Resources/schematic_palette.png Resources/schematic_tablenode.png - Resources/port_red.png - Resources/port_red_highlight.png - Resources/port_blue.png - Resources/port_blue_highlight.png - Resources/spline_child_port.png - Resources/spline_child_port_disconnect.png - Resources/spline_parent_port.png + Resources/port_red.svg + Resources/port_red_highlight.svg + Resources/port_blue.svg + Resources/port_blue_highlight.svg + Resources/spline_child_port.svg + Resources/spline_child_port_disconnect.svg + Resources/spline_parent_port.svg Resources/schematic_prev_eye.png Resources/schematic_table_view.png Resources/schematic_table_view_transp.png @@ -181,8 +179,8 @@ Resources/fxport_blue.svg Resources/cachefx.png Resources/schematic_link.svg - Resources/schematic_thumbtoggle_on.png - Resources/schematic_thumbtoggle_off.png + Resources/schematic_thumbtoggle_on.svg + Resources/schematic_thumbtoggle_off.svg Resources/dragcursor_exp_text.png Resources/fxicons/fx_checkboard.png Resources/fxicons/fx_colorcard.png @@ -300,13 +298,13 @@ Resources/fxicons/fx_iwa_bokeh.png Resources/fxicons/fx_iwa_soapbubble.png Resources/fxicons/fx_unidentified.png - Resources/keyframe_noanim.png - Resources/keyframe_key.png - Resources/keyframe_modified.png - Resources/keyframe_inbetween.png + Resources/keyframe_noanim.svg + Resources/keyframe_key.svg + Resources/keyframe_modified.svg + Resources/keyframe_inbetween.svg Resources/switchport_on.svg Resources/switchport_off.svg Resources/switchport_over.svg - Resources/plus.png + Resources/plus.svg