# HG changeset patch # User nemo # Date 1522425376 14400 # Node ID 5ac2bdefa173e62dc26694e539aa7b45647f66b8 # Parent e3613c0d360089016f90ecf9465fc0ab7b6922e9 add title manipulation diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Fri Mar 30 17:01:30 2018 +0200 +++ b/QTfrontend/hedgewars.qrc Fri Mar 30 11:56:16 2018 -0400 @@ -4,6 +4,7 @@ res/css/qt.css res/css/chat.css res/css/christmas.css + res/css/april1.css res/css/easter.css res/css/birthday.css res/hh25x25.png @@ -73,6 +74,7 @@ res/BackgroundBirthday.png res/Exit.png res/HedgewarsTitle.png + res/TomatowarsTitle.png res/LocalPlay.png res/NetworkPlay.png res/NetworkPlayDisabled.png diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Fri Mar 30 17:01:30 2018 +0200 +++ b/QTfrontend/hwconsts.h Fri Mar 30 11:56:16 2018 -0400 @@ -67,6 +67,7 @@ #define SEASON_CHRISTMAS 2 #define SEASON_HWBDAY 4 #define SEASON_EASTER 8 +#define SEASON_APRIL1 16 #define NETGAME_DEFAULT_SERVER "netserver.hedgewars.org" #define NETGAME_DEFAULT_PORT 46631 diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Fri Mar 30 17:01:30 2018 +0200 +++ b/QTfrontend/main.cpp Fri Mar 30 11:56:16 2018 -0400 @@ -96,6 +96,10 @@ season = SEASON_HWBDAY; years_since_foundation = date.year() - 2004; } + else if (date.month() == 4 && date.day() == 1) + { + season = SEASON_APRIL1; + } //Easter? else if (calculateEaster(date.year()) == date) season = SEASON_EASTER; @@ -423,6 +427,9 @@ case SEASON_CHRISTMAS : fname = "christmas.css"; break; + case SEASON_APRIL1 : + fname = "april1.css"; + break; case SEASON_EASTER : fname = "easter.css"; break; diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/res/TomatowarsTitle.png Binary file QTfrontend/res/TomatowarsTitle.png has changed diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/res/css/qt.css --- a/QTfrontend/res/css/qt.css Fri Mar 30 17:01:30 2018 +0200 +++ b/QTfrontend/res/css/qt.css Fri Mar 30 11:56:16 2018 -0400 @@ -17,6 +17,11 @@ * *****************************************************************************/ +#infoButton +{ +border: transparent; +background: transparent; +} HWForm,QDialog { background-image: url(":/res/Background.png"); background-position: bottom center; diff -r e3613c0d3600 -r 5ac2bdefa173 QTfrontend/ui/page/pagemain.cpp --- a/QTfrontend/ui/page/pagemain.cpp Fri Mar 30 17:01:30 2018 +0200 +++ b/QTfrontend/ui/page/pagemain.cpp Fri Mar 30 11:56:16 2018 -0400 @@ -75,7 +75,7 @@ // button order matters for overlapping (what's on top and what isn't) BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true); - BtnInfo->setStyleSheet("border: transparent;background: transparent;"); + BtnInfo->setObjectName("infoButton"); BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project")); pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);