From bbf0ffb06023384ac12223b21d52012ffe686847 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 13 Sep 2021 14:00:01 +0200 Subject: [PATCH] Fix top panel font color when phone is set to dark mode but still a light style is used --- nymea-app/nymea-app.pro | 4 ++-- .../platformintegration}/ios/platformhelperios.mm | 2 +- .../platformintegration}/ios/pushnotifications.mm | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {packaging => nymea-app/platformintegration}/ios/platformhelperios.mm (99%) rename {packaging => nymea-app/platformintegration}/ios/pushnotifications.mm (100%) diff --git a/nymea-app/nymea-app.pro b/nymea-app/nymea-app.pro index 9b31d735..fc7f817f 100644 --- a/nymea-app/nymea-app.pro +++ b/nymea-app/nymea-app.pro @@ -131,8 +131,8 @@ ios: { message("iOS build") HEADERS += platformintegration/ios/platformhelperios.h SOURCES += platformintegration/ios/platformhelperios.cpp - OBJECTIVE_SOURCES += $${IOS_PACKAGE_DIR}/platformhelperios.mm \ - $${IOS_PACKAGE_DIR}/pushnotifications.mm \ + OBJECTIVE_SOURCES += platformintegration/ios/platformhelperios.mm \ + platformintegration/ios/pushnotifications.mm \ OTHER_FILES += $${OBJECTIVE_SOURCES} diff --git a/packaging/ios/platformhelperios.mm b/nymea-app/platformintegration/ios/platformhelperios.mm similarity index 99% rename from packaging/ios/platformhelperios.mm rename to nymea-app/platformintegration/ios/platformhelperios.mm index d64de231..da12a6f6 100644 --- a/packaging/ios/platformhelperios.mm +++ b/nymea-app/platformintegration/ios/platformhelperios.mm @@ -115,7 +115,7 @@ void PlatformHelperIOS::setTopPanelColorInternal(const QColor &color) } if (((color.red() * 299 + color.green() * 587 + color.blue() * 114) / 1000) > 123) { - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES]; + [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDarkContent animated:YES]; } else { [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES]; } diff --git a/packaging/ios/pushnotifications.mm b/nymea-app/platformintegration/ios/pushnotifications.mm similarity index 100% rename from packaging/ios/pushnotifications.mm rename to nymea-app/platformintegration/ios/pushnotifications.mm