From 2e1a802d0f44fa3e3ec026bffa137a4a9f4ec6d8 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Fri, 23 Jun 2017 10:27:00 +0200 Subject: [PATCH] feat(Colors): add linphone friday colors --- src/components/other/colors/Colors.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/components/other/colors/Colors.cpp b/src/components/other/colors/Colors.cpp index fc62c1408..23e15dbce 100644 --- a/src/components/other/colors/Colors.cpp +++ b/src/components/other/colors/Colors.cpp @@ -29,11 +29,35 @@ #define COLORS_SECTION "ui_colors" +#ifndef LINPHONE_FRIDAY +#define LINPHONE_FRIDAY 1 +#endif // ifndef LINPHONE_FRIDAY + +#if LINPHONE_FRIDAY +#include +#endif // if LINPHONE_FRIDAY + using namespace std; // ============================================================================= -Colors::Colors (QObject *parent) : QObject(parent) {} +#if LINPHONE_FRIDAY + + static void setLinphoneFridayColors (Colors &colors) { + colors.setProperty("i", QColor("#F48D8D")); + colors.setProperty("s", QColor("#F58585")); + colors.setProperty("t", QColor("#FFC5C5")); + } + +#endif // if LINPHONE_FRIDAY + +Colors::Colors (QObject *parent) : QObject(parent) { + #if LINPHONE_FRIDAY + if (QDate::currentDate().dayOfWeek() == 5) + ::setLinphoneFridayColors(*this); + + #endif // if LINPHONE_FRIDAY +} void Colors::useConfig (const std::shared_ptr &config) { overrideColors(config);