Make all icons available as PNG
@ -35,19 +35,19 @@ CropScene::CropScene(QObject *parent, QPixmap pixmap)
|
|||||||
static_cast<Qt::BrushStyle>(settings::settings().value("brushStyle", static_cast<int>(Qt::SolidPattern)).toInt()));
|
static_cast<Qt::BrushStyle>(settings::settings().value("brushStyle", static_cast<int>(Qt::SolidPattern)).toInt()));
|
||||||
|
|
||||||
menu = new QMenuBar;
|
menu = new QMenuBar;
|
||||||
addDrawingAction(menu, "Free draw", ":/icons/pencil.svg", [] { return new PathItem; });
|
addDrawingAction(menu, "Free draw", ":/icons/pencil.png", [] { return new PathItem; });
|
||||||
addDrawingAction(menu, "Blur", ":/icons/blur.png", [] { return new BlurItem; });
|
addDrawingAction(menu, "Blur", ":/icons/blur.png", [] { return new BlurItem; });
|
||||||
addDrawingAction(menu, "Straight line", ":/icons/line.svg", [] { return new LineItem; });
|
addDrawingAction(menu, "Straight line", ":/icons/line.png", [] { return new LineItem; });
|
||||||
addDrawingAction(menu, "Text", ":/icons/text.svg", [] { return new TextItem; });
|
addDrawingAction(menu, "Text", ":/icons/text.png", [] { return new TextItem; });
|
||||||
addDrawingAction(menu, "Rectangle", ":/icons/rectangle.svg", [] { return new RectItem; });
|
addDrawingAction(menu, "Rectangle", ":/icons/rectangle.png", [] { return new RectItem; });
|
||||||
addDrawingAction(menu, "Ellipse", ":/icons/circle.svg", [] { return new EllipseItem; });
|
addDrawingAction(menu, "Ellipse", ":/icons/circle.png", [] { return new EllipseItem; });
|
||||||
addDrawingAction(menu, "Arrow", ":/icons/arrow.svg", [] { return new ArrowItem; });
|
addDrawingAction(menu, "Arrow", ":/icons/arrow.png", [] { return new ArrowItem; });
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
addDrawingAction(menu, "Eraser", ":/icons/erase.svg", [] { return new EraserItem; });
|
addDrawingAction(menu, "Eraser", ":/icons/erase.png", [] { return new EraserItem; });
|
||||||
QAction *clear = menu->addAction("");
|
QAction *clear = menu->addAction("");
|
||||||
clear->setToolTip("Clear all drawing");
|
clear->setToolTip("Clear all drawing");
|
||||||
clear->setIcon(QIcon(":/icons/delete.svg"));
|
clear->setIcon(QIcon(":/icons/delete.png"));
|
||||||
connect(clear, &QAction::triggered, [&] {
|
connect(clear, &QAction::triggered, [&] {
|
||||||
auto its = items();
|
auto its = items();
|
||||||
for (auto i : its) {
|
for (auto i : its) {
|
||||||
@ -60,12 +60,12 @@ CropScene::CropScene(QObject *parent, QPixmap pixmap)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
addDrawingAction(menu, "Crop", ":/icons/crop.svg", [] { return nullptr; });
|
addDrawingAction(menu, "Crop", ":/icons/crop.png", [] { return nullptr; });
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
QAction *settings = menu->addAction("");
|
QAction *settings = menu->addAction("");
|
||||||
settings->setToolTip("Settings");
|
settings->setToolTip("Settings");
|
||||||
settings->setIcon(QIcon(":/icons/settings.svg"));
|
settings->setIcon(QIcon(":/icons/settings.png"));
|
||||||
connect(settings, &QAction::triggered, [&] {
|
connect(settings, &QAction::triggered, [&] {
|
||||||
hide();
|
hide();
|
||||||
BrushPenSelection(this).exec();
|
BrushPenSelection(this).exec();
|
||||||
@ -76,20 +76,20 @@ CropScene::CropScene(QObject *parent, QPixmap pixmap)
|
|||||||
display->setDisabled(true);
|
display->setDisabled(true);
|
||||||
|
|
||||||
QAction *fonts = menu->addAction("");
|
QAction *fonts = menu->addAction("");
|
||||||
fonts->setIcon(QIcon(":/icons/fontsettings.svg"));
|
fonts->setIcon(QIcon(":/icons/fontsettings.png"));
|
||||||
connect(fonts, &QAction::triggered, this, &CropScene::fontAsk);
|
connect(fonts, &QAction::triggered, this, &CropScene::fontAsk);
|
||||||
|
|
||||||
menu->addAction(fonts);
|
menu->addAction(fonts);
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
QAction *confirm = menu->addAction("");
|
QAction *confirm = menu->addAction("");
|
||||||
confirm->setToolTip("Confirm");
|
confirm->setToolTip("Confirm");
|
||||||
confirm->setIcon(QIcon(":/icons/accept.svg"));
|
confirm->setIcon(QIcon(":/icons/accept.png"));
|
||||||
connect(confirm, &QAction::triggered, [this] { done(true); });
|
connect(confirm, &QAction::triggered, [this] { done(true); });
|
||||||
menu->addAction(confirm);
|
menu->addAction(confirm);
|
||||||
|
|
||||||
QAction *cancel = menu->addAction("");
|
QAction *cancel = menu->addAction("");
|
||||||
cancel->setToolTip("Cancel");
|
cancel->setToolTip("Cancel");
|
||||||
cancel->setIcon(QIcon(":/icons/cancel.svg"));
|
cancel->setIcon(QIcon(":/icons/cancel.png"));
|
||||||
connect(cancel, &QAction::triggered, [this] { done(false); });
|
connect(cancel, &QAction::triggered, [this] { done(false); });
|
||||||
menu->addAction(cancel);
|
menu->addAction(cancel);
|
||||||
|
|
||||||
|
28
icon.qrc
@ -1,21 +1,21 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>icons/icon.png</file>
|
|
||||||
<file>icons/icon.svg</file>
|
<file>icons/icon.svg</file>
|
||||||
|
<file>icons/icon.png</file>
|
||||||
<file>icons/icon.ico</file>
|
<file>icons/icon.ico</file>
|
||||||
<file>icons/pencil.svg</file>
|
<file>icons/pencil.png</file>
|
||||||
<file>icons/rectangle.svg</file>
|
<file>icons/rectangle.png</file>
|
||||||
<file>icons/line.svg</file>
|
<file>icons/line.png</file>
|
||||||
<file>icons/text.svg</file>
|
<file>icons/text.png</file>
|
||||||
<file>icons/delete.svg</file>
|
<file>icons/delete.png</file>
|
||||||
<file>icons/arrow.svg</file>
|
<file>icons/arrow.png</file>
|
||||||
<file>icons/settings.svg</file>
|
<file>icons/settings.png</file>
|
||||||
<file>icons/fontsettings.svg</file>
|
<file>icons/fontsettings.png</file>
|
||||||
<file>icons/erase.svg</file>
|
<file>icons/erase.png</file>
|
||||||
<file>icons/blur.png</file>
|
<file>icons/blur.png</file>
|
||||||
<file>icons/accept.svg</file>
|
<file>icons/accept.png</file>
|
||||||
<file>icons/cancel.svg</file>
|
<file>icons/cancel.png</file>
|
||||||
<file>icons/crop.svg</file>
|
<file>icons/crop.png</file>
|
||||||
<file>icons/circle.svg</file>
|
<file>icons/circle.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
icons/accept.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
icons/arrow.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
icons/blur.png
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 64 KiB |
BIN
icons/cancel.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
icons/circle.png
Normal file
After Width: | Height: | Size: 535 B |
BIN
icons/crop.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
icons/delete.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
icons/erase.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
icons/fontsettings.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
icons/icon.png
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 22 KiB |
BIN
icons/line.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
icons/pencil.png
Normal file
After Width: | Height: | Size: 424 B |
BIN
icons/rectangle.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
icons/settings.png
Normal file
After Width: | Height: | Size: 451 B |
BIN
icons/text.png
Normal file
After Width: | Height: | Size: 25 KiB |