Commit 2e1a802d authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Colors): add linphone friday colors

parent 4e732051
...@@ -29,11 +29,35 @@ ...@@ -29,11 +29,35 @@
#define COLORS_SECTION "ui_colors" #define COLORS_SECTION "ui_colors"
#ifndef LINPHONE_FRIDAY
#define LINPHONE_FRIDAY 1
#endif // ifndef LINPHONE_FRIDAY
#if LINPHONE_FRIDAY
#include <QDate>
#endif // if LINPHONE_FRIDAY
using namespace std; 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<linphone::Config> &config) { void Colors::useConfig (const std::shared_ptr<linphone::Config> &config) {
overrideColors(config); overrideColors(config);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment