为什么 Textual 没有明显的原因有一个“派对”主题图标?

Dan*_*eck 4 textual macos

我刚刚注意到我的 IRC 客户端Textual有一个与平时不同的图标。为什么?

应用程序中没有可以解释这一点的通知。这不是我的生日,也不是我认识的任何人的生日。

截屏

Dan*_*eck 6

今天,7 月 23 日,是 Textual 的生日,它更改了当天的图标。从源代码

Textual 的第一次公开提交发生在 2010 年 7 月 23 日。这一天是我们考虑应用程序生日的日子。

显示不同图标条件的源代码摘录:

/* THIS IS A SECRET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 Birthday icon designed by Alex Sørlie Glomsaas. */

NSCalendar *sysCalendar = [NSCalendar currentCalendar];

NSDateComponents *breakdownInfo = [sysCalendar components:(NSDayCalendarUnit | NSMonthCalendarUnit) fromDate:[NSDate date]];

/* The first public commit of Textual occured on July, 23, 2010. This is the day
 that we consider the birthday of the application. */
if ([breakdownInfo month] == 7 && [breakdownInfo day] == 23) {
    return [NSImage imageNamed:@"birthdayIcon"];
} else {
    return [NSImage imageNamed:@"NSApplicationIcon"];
}
Run Code Online (Sandbox Code Playgroud)