summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2022-09-06 12:38:25 +0200
committerKieran Cawthray <kieranc@gmail.com>2022-09-06 12:58:46 +0200
commit4fe834efda5f7c5a1f35c6ca3b07f4f2662fc4b8 (patch)
tree7173cbf485933fdf055e1e4943717f18d03f3f5d
parentfbc9f63308c0e9be90db387332cf60e3a117b7ee (diff)
Cleanup
-rw-r--r--src/components/settings/Settings.h3
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp50
2 files changed, 26 insertions, 27 deletions
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h
index cab909e7..62586567 100644
--- a/src/components/settings/Settings.h
+++ b/src/components/settings/Settings.h
@@ -37,7 +37,7 @@ namespace Pinetime {
Orange
};
enum class PTSGaugeStyle : uint8_t { Full, Half, Numeric };
-
+
struct PineTimeStyle {
Colors ColorTime = Colors::Teal;
Colors ColorBar = Colors::Teal;
@@ -237,7 +237,6 @@ namespace Pinetime {
ChimesOption chimesOption = ChimesOption::None;
PineTimeStyle PTS;
- //PineTimeStyle::GaugeStyle gaugeStyle = PineTimeStyle::GaugeStyle::Full;
std::bitset<4> wakeUpMode {0};
uint16_t shakeWakeThreshold = 150;
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index 0bbff30f..14030920 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -189,7 +189,7 @@ WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
} else if (settingsController.GetPTSGaugeStyle() == Pinetime::Controllers::Settings::PTSGaugeStyle::Numeric) {
lv_obj_set_hidden(stepGauge, true);
}
-
+
lv_obj_set_style_local_pad_right(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3);
lv_obj_set_style_local_pad_left(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3);
lv_obj_set_style_local_pad_bottom(stepGauge, LV_GAUGE_PART_MAIN, LV_STATE_DEFAULT, 3);
@@ -626,32 +626,32 @@ void WatchFacePineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event)
}
if (object == btnSteps) {
if (!lv_obj_get_hidden(stepGauge) && (lv_obj_get_hidden(timeDD3))) {
- // show half gauge & seconds
- lv_obj_set_hidden(timeDD3, false);
- lv_obj_set_size(stepGauge, 37, 37);
- lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, -10);
- lv_gauge_set_scale(stepGauge, 180, 5, 0);
- lv_gauge_set_angle_offset(stepGauge, 0);
- lv_gauge_set_critical_value(stepGauge, 120);
- settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Half);
+ // show half gauge & seconds
+ lv_obj_set_hidden(timeDD3, false);
+ lv_obj_set_size(stepGauge, 37, 37);
+ lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, -10);
+ lv_gauge_set_scale(stepGauge, 180, 5, 0);
+ lv_gauge_set_angle_offset(stepGauge, 0);
+ lv_gauge_set_critical_value(stepGauge, 120);
+ settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Half);
} else if (!lv_obj_get_hidden(timeDD3) && (lv_obj_get_hidden(stepValue))) {
- // show step count & icon
- lv_obj_set_hidden(timeDD3, true);
- lv_obj_set_hidden(stepGauge, true);
- lv_obj_set_hidden(stepValue, false);
- lv_obj_set_hidden(stepIcon, false);
- settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Numeric);
+ // show step count & icon
+ lv_obj_set_hidden(timeDD3, true);
+ lv_obj_set_hidden(stepGauge, true);
+ lv_obj_set_hidden(stepValue, false);
+ lv_obj_set_hidden(stepIcon, false);
+ settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Numeric);
} else {
- // show full gauge
- lv_obj_set_hidden(stepGauge, false);
- lv_obj_set_hidden(stepValue, true);
- lv_obj_set_hidden(stepIcon, true);
- lv_obj_set_size(stepGauge, 40, 40);
- lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
- lv_gauge_set_scale(stepGauge, 360, 11, 0);
- lv_gauge_set_angle_offset(stepGauge, 180);
- lv_gauge_set_critical_value(stepGauge, 100);
- settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Full);
+ // show full gauge
+ lv_obj_set_hidden(stepGauge, false);
+ lv_obj_set_hidden(stepValue, true);
+ lv_obj_set_hidden(stepIcon, true);
+ lv_obj_set_size(stepGauge, 40, 40);
+ lv_obj_align(stepGauge, sidebar, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
+ lv_gauge_set_scale(stepGauge, 360, 11, 0);
+ lv_gauge_set_angle_offset(stepGauge, 180);
+ lv_gauge_set_critical_value(stepGauge, 100);
+ settingsController.SetPTSGaugeStyle(Controllers::Settings::PTSGaugeStyle::Full);
}
}
if (object == btnSetColor) {