apps.cpp: Change editUserAppsBtn icon while in 'Edit' mode

This commit is contained in:
Nicolas Mailloux 2022-06-23 00:40:54 -04:00
parent e8010300c7
commit 9e7edc8d53
4 changed files with 5 additions and 2 deletions

View file

@ -305,6 +305,7 @@ void apps::on_editUserAppsBtn_clicked()
userAppsSecondPage = true; userAppsSecondPage = true;
// Settings page // Settings page
ui->editUserAppsBtn->setIcon(QIcon(":/resources/save.png"));
showUserApps(userAppsSecondPage); showUserApps(userAppsSecondPage);
emit showUserAppsEdit(userAppsSecondPage); emit showUserAppsEdit(userAppsSecondPage);
@ -313,8 +314,9 @@ void apps::on_editUserAppsBtn_clicked()
else { else {
userAppsSecondPage = false; userAppsSecondPage = false;
userAppsAvailable = false; userAppsAvailable = false;
// Launch page
// Launch page
ui->editUserAppsBtn->setIcon(QIcon(":/resources/edit.png"));
// It changed via updateJsonFileSlot, and now it writes it only once // It changed via updateJsonFileSlot, and now it writes it only once
jsonFile.open(QFile::WriteOnly | QFile::Text | QFile::Truncate); jsonFile.open(QFile::WriteOnly | QFile::Text | QFile::Truncate);
jsonFile.write(jsonDocument.toJson()); jsonFile.write(jsonDocument.toJson());

View file

@ -75,5 +75,6 @@
<file>resources/eink-square-encfs.qss</file> <file>resources/eink-square-encfs.qss</file>
<file>resources/tzlist</file> <file>resources/tzlist</file>
<file>resources/edit.png</file> <file>resources/edit.png</file>
<file>resources/save.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
resources/save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB