using theme icons

This commit is contained in:
Rafael 2016-04-14 02:41:24 +02:00
parent f44b5bc259
commit e27fb3e480
4 changed files with 32 additions and 13 deletions

View File

@ -189,21 +189,21 @@ void SavegameWidget::contextMenuEvent(QContextMenuEvent *ev)
{
QMenu contextMenu(this);
contextMenu.addAction(tr("&View"), this, SLOT(on_cmdView_clicked()));
contextMenu.addAction(tr("&Export"), this, SLOT(on_cmdCopy_clicked()));
contextMenu.addAction(tr("&Remove"), this, SLOT(on_cmdDelete_clicked()));
contextMenu.addAction(QIcon::fromTheme("document-save"), tr("&Export"), this, SLOT(on_cmdCopy_clicked()));
contextMenu.addAction(QIcon::fromTheme("edit-delete"), tr("&Remove"), this, SLOT(on_cmdDelete_clicked()));
if (ui->cbSelected->isVisible())
{
contextMenu.addSeparator();
if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected())); }
if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(savegameSelected())); }
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
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"));
}
else
{
contextMenu.addSeparator();
contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected()));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(QIcon::fromTheme("edit-select-all"), tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
}
//ui->SavegameFrame->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
contextMenu.exec(ev->globalPos());

View File

@ -203,24 +203,25 @@ 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(tr("&View"), this, SLOT(on_cmdView_clicked()));
contextMenu.addAction(QIcon::fromTheme("image-x-generic"), tr("&View"), this, SLOT(on_cmdView_clicked()));
contextMenu.addMenu(&exportMenu);
contextMenu.addAction(tr("&Remove"), this, SLOT(on_cmdDelete_clicked()));
contextMenu.addAction(QIcon::fromTheme("edit-delete"), 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(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
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"));
}
else
{
contextMenu.addSeparator();
contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected()));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(QIcon::fromTheme("edit-select-all"), tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
}
//ui->SnapmaticFrame->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
contextMenu.exec(ev->globalPos());

View File

@ -47,6 +47,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D
profileUI = 0;
ui->menuProfile->setEnabled(false);
ui->actionSelect_profile->setEnabled(false);
ui->actionAbout_gta5sync->setIcon(IconLoader::loadingAppIcon());
defaultWindowTitle = tr("gta5sync - %1");
this->setWindowTitle(defaultWindowTitle.arg(tr("Select Profile")));

View File

@ -128,7 +128,7 @@
<x>0</x>
<y>0</y>
<width>625</width>
<height>21</height>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -178,7 +178,8 @@
</action>
<action name="actionExit">
<property name="icon">
<iconset theme="application-exit"/>
<iconset theme="application-exit">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Exit</string>
@ -199,6 +200,9 @@
</property>
</action>
<action name="actionOptions">
<property name="icon">
<iconset theme="preferences-system"/>
</property>
<property name="text">
<string>&amp;Settings</string>
</property>
@ -207,6 +211,9 @@
</property>
</action>
<action name="actionSelect_all">
<property name="icon">
<iconset theme="edit-select-all"/>
</property>
<property name="text">
<string>Select &amp;All</string>
</property>
@ -215,6 +222,9 @@
</property>
</action>
<action name="actionDeselect_all">
<property name="icon">
<iconset theme="edit-clear"/>
</property>
<property name="text">
<string>&amp;Deselect All</string>
</property>
@ -223,6 +233,9 @@
</property>
</action>
<action name="actionExport_selected">
<property name="icon">
<iconset theme="document-save"/>
</property>
<property name="text">
<string>&amp;Export selected...</string>
</property>
@ -239,6 +252,9 @@
</property>
</action>
<action name="action_Import">
<property name="icon">
<iconset theme="document-open"/>
</property>
<property name="text">
<string>&amp;Import files...</string>
</property>
@ -248,7 +264,8 @@
</action>
<action name="actionOpen_File">
<property name="icon">
<iconset theme="document-open"/>
<iconset theme="document-open">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Open File...</string>