1
0
Fork 0

GUI: icon improvements

This commit is contained in:
mrexodia 2016-12-14 02:39:44 +01:00
parent 9b4d140eb4
commit 39010c8854
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
11 changed files with 26 additions and 1 deletions

View File

@ -75,3 +75,19 @@ QString getSymbolicName(duint addr)
else
return addrText;
}
static bool isChristmas()
{
srand(GetTickCount());
duint setting = 0;
if(BridgeSettingGetUint("Misc", "NoChristmas", &setting) && setting)
return false;
auto date = QDateTime::currentDateTime().date();
return date.month() == 12 && date.day() >= 23 && date.day() <= 26;
}
QString couldItBeChristmas(QString icon)
{
static bool christmas = isChristmas();
return christmas ? QString("christmas%0.png").arg(rand() % 8 + 1) : icon;
}

View File

@ -13,6 +13,7 @@ bool SimpleInputBox(QWidget* parent, const QString & title, QString defaultValue
void SimpleErrorBox(QWidget* parent, const QString & title, const QString & text);
void SimpleWarningBox(QWidget* parent, const QString & title, const QString & text);
QString getSymbolicName(duint addr);
QString couldItBeChristmas(QString icon);
#define DIcon(file) QIcon(QString(":/icons/images/").append(file))
#define DIcon(file) QIcon(QString(":/icons/images/").append(couldItBeChristmas(file)))
#endif // MISCUTIL_H

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

View File

@ -278,5 +278,13 @@
<file>images/uac.png</file>
<file>images/hidetab.png</file>
<file>images/variables.png</file>
<file>images/christmas1.png</file>
<file>images/christmas2.png</file>
<file>images/christmas3.png</file>
<file>images/christmas4.png</file>
<file>images/christmas5.png</file>
<file>images/christmas6.png</file>
<file>images/christmas7.png</file>
<file>images/christmas8.png</file>
</qresource>
</RCC>