GUI: icon improvements
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
After Width: | Height: | Size: 797 B |
After Width: | Height: | Size: 827 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 859 B |
After Width: | Height: | Size: 814 B |
After Width: | Height: | Size: 804 B |
After Width: | Height: | Size: 893 B |
|
@ -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>
|
||||
|
|