Don't try to force the usage of theme icons

This commit is contained in:
Rafael 2016-09-20 06:48:33 +02:00
parent b591ff45ac
commit ed6398d512
3 changed files with 16 additions and 17 deletions

View file

@ -191,25 +191,24 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev)
{
QMenu contextMenu(this);
QMenu exportMenu(tr("&Export"), this);
exportMenu.setIcon(QIcon::fromTheme("document-save"));
exportMenu.addAction(tr("Export as &JPG picture..."), this, SLOT(on_cmdExport_clicked()));
exportMenu.addAction(tr("Export as &GTA Snapmatic..."), this, SLOT(on_cmdCopy_clicked()));
contextMenu.addAction(QIcon::fromTheme("image-x-generic"), tr("&View"), this, SLOT(on_cmdView_clicked()));
contextMenu.addAction(tr("&View"), this, SLOT(on_cmdView_clicked()));
contextMenu.addMenu(&exportMenu);
contextMenu.addAction(QIcon::fromTheme("edit-delete"), tr("&Remove"), this, SLOT(on_cmdDelete_clicked()));
contextMenu.addAction(tr("&Remove"), this, SLOT(on_cmdDelete_clicked()));
if (ui->cbSelected->isVisible())
{
contextMenu.addSeparator();
if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected())); }
if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(pictureSelected())); }
contextMenu.addAction(QIcon::fromTheme("edit-select-all"), tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(QIcon::fromTheme("edit-clear"), tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
}
else
{
contextMenu.addSeparator();
contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected()));
contextMenu.addAction(QIcon::fromTheme("edit-select-all"), tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
}
contextMenu.exec(ev->globalPos());
}