Big UI and navigation Rewrite
new navigation add some color to the apps redesign menus new settings menu new quick settings code clean up size reduction by converting navigation images to font and more...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "BrightnessController.h"
|
||||
#include <hal/nrf_gpio.h>
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Controllers;
|
||||
|
||||
@@ -68,3 +69,30 @@ void BrightnessController::Restore() {
|
||||
Set(backupLevel);
|
||||
}
|
||||
|
||||
void BrightnessController::Step() {
|
||||
switch(level) {
|
||||
case Levels::Low: Set(Levels::Medium); break;
|
||||
case Levels::Medium: Set(Levels::High); break;
|
||||
case Levels::High: Set(Levels::Low); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
const char* BrightnessController::GetIcon() {
|
||||
switch(level) {
|
||||
case Levels::Medium: return Applications::Screens::Symbols::brightnessMedium;
|
||||
case Levels::High: return Applications::Screens::Symbols::brightnessHigh;
|
||||
default: break;
|
||||
}
|
||||
return Applications::Screens::Symbols::brightnessLow;
|
||||
}
|
||||
|
||||
const char* BrightnessController::ToString() {
|
||||
switch(level) {
|
||||
case Levels::Off: return "Off";
|
||||
case Levels::Low: return "Low";
|
||||
case Levels::Medium: return "Medium";
|
||||
case Levels::High: return "High";
|
||||
default : return "???";
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,14 @@ namespace Pinetime {
|
||||
Levels Level() const;
|
||||
void Lower();
|
||||
void Higher();
|
||||
void Step();
|
||||
|
||||
void Backup();
|
||||
void Restore();
|
||||
|
||||
const char* GetIcon();
|
||||
const char* ToString();
|
||||
|
||||
private:
|
||||
static constexpr uint8_t pinLcdBacklight1 = 14;
|
||||
static constexpr uint8_t pinLcdBacklight2 = 22;
|
||||
|
||||
Reference in New Issue
Block a user