Fix the settings button
This commit is contained in:
parent
c8de78cc56
commit
c557d13b7f
@ -63,35 +63,35 @@ CropScene::CropScene(QObject *parent, QPixmap pixmap)
|
|||||||
addDrawingAction(menu, "Crop", ":/icons/crop.svg", [] { return nullptr; });
|
addDrawingAction(menu, "Crop", ":/icons/crop.svg", [] { return nullptr; });
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
QAction *action = new QAction;
|
QAction *settings = menu->addAction("");
|
||||||
action->setToolTip("Settings");
|
settings->setToolTip("Settings");
|
||||||
action->setIcon(QIcon(":/icons/settings.svg"));
|
settings->setIcon(QIcon(":/icons/settings.svg"));
|
||||||
menu->addSeparator();
|
connect(settings, &QAction::triggered, [&] {
|
||||||
display = menu->addAction(drawingName);
|
|
||||||
display->setDisabled(true);
|
|
||||||
connect(action, &QAction::triggered, [&] {
|
|
||||||
hide();
|
hide();
|
||||||
BrushPenSelection(this).exec();
|
BrushPenSelection(this).exec();
|
||||||
show();
|
show();
|
||||||
});
|
});
|
||||||
|
|
||||||
action = menu->addAction("");
|
|
||||||
action->setIcon(QIcon(":/icons/fontsettings.svg"));
|
|
||||||
connect(action, &QAction::triggered, this, &CropScene::fontAsk);
|
|
||||||
|
|
||||||
menu->addAction(action);
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
action = menu->addAction("");
|
display = menu->addAction(drawingName);
|
||||||
action->setToolTip("Confirm");
|
display->setDisabled(true);
|
||||||
action->setIcon(QIcon(":/icons/accept.svg"));
|
|
||||||
connect(action, &QAction::triggered, [this] { done(true); });
|
|
||||||
menu->addAction(action);
|
|
||||||
|
|
||||||
action = menu->addAction("");
|
QAction *fonts = menu->addAction("");
|
||||||
action->setToolTip("Cancel");
|
fonts->setIcon(QIcon(":/icons/fontsettings.svg"));
|
||||||
action->setIcon(QIcon(":/icons/cancel.svg"));
|
connect(fonts, &QAction::triggered, this, &CropScene::fontAsk);
|
||||||
connect(action, &QAction::triggered, [this] { done(false); });
|
|
||||||
menu->addAction(action);
|
menu->addAction(fonts);
|
||||||
|
menu->addSeparator();
|
||||||
|
QAction *confirm = menu->addAction("");
|
||||||
|
confirm->setToolTip("Confirm");
|
||||||
|
confirm->setIcon(QIcon(":/icons/accept.svg"));
|
||||||
|
connect(confirm, &QAction::triggered, [this] { done(true); });
|
||||||
|
menu->addAction(confirm);
|
||||||
|
|
||||||
|
QAction *cancel = menu->addAction("");
|
||||||
|
cancel->setToolTip("Cancel");
|
||||||
|
cancel->setIcon(QIcon(":/icons/cancel.svg"));
|
||||||
|
connect(cancel, &QAction::triggered, [this] { done(false); });
|
||||||
|
menu->addAction(cancel);
|
||||||
|
|
||||||
QPolygonF cursorPoly;
|
QPolygonF cursorPoly;
|
||||||
cursorPoly << QPoint(-10, 0) //
|
cursorPoly << QPoint(-10, 0) //
|
||||||
|
Loading…
Reference in New Issue
Block a user