mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-20 12:54:33 -04:00
Theme system (#2164)
* Themes instead of Styles * Colors changed to theme colors * Reworked style management * Theme settings app * warn, menu dual set * Added Aqua style
This commit is contained in:
parent
a8203a6372
commit
ced8012783
143 changed files with 1566 additions and 1154 deletions
|
@ -32,7 +32,6 @@ using namespace portapack;
|
|||
|
||||
#include "string_format.hpp"
|
||||
#include "complex.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_font_fixed_5x8.hpp"
|
||||
#include "file_path.hpp"
|
||||
|
||||
|
@ -138,8 +137,8 @@ void GeoPos::focus() {
|
|||
|
||||
void GeoPos::hide_altandspeed() {
|
||||
// Color altitude grey to indicate it's not updated in manual panning mode
|
||||
field_altitude.set_style(&Styles::grey);
|
||||
field_speed.set_style(&Styles::grey);
|
||||
field_altitude.set_style(Theme::getInstance()->fg_medium);
|
||||
field_speed.set_style(Theme::getInstance()->fg_medium);
|
||||
}
|
||||
|
||||
void GeoPos::set_altitude(int32_t altitude) {
|
||||
|
@ -322,13 +321,13 @@ void GeoMap::draw_map_grid() {
|
|||
if (map_zoom <= MAP_ZOOM_RESOLUTION_LIMIT)
|
||||
return;
|
||||
|
||||
display.fill_rectangle({{0, r.top()}, {r.width(), r.height()}}, Color::black());
|
||||
display.fill_rectangle({{0, r.top()}, {r.width(), r.height()}}, Theme::getInstance()->bg_darkest->background);
|
||||
|
||||
for (uint16_t line = y; line < r.height(); line += grid_spacing) {
|
||||
display.fill_rectangle({{0, r.top() + line}, {r.width(), 1}}, Color::darker_grey());
|
||||
display.fill_rectangle({{0, r.top() + line}, {r.width(), 1}}, Theme::getInstance()->bg_darker->background);
|
||||
}
|
||||
for (uint16_t column = x; column < r.width(); column += grid_spacing) {
|
||||
display.fill_rectangle({{column, r.top()}, {1, r.height()}}, Color::darker_grey());
|
||||
display.fill_rectangle({{column, r.top()}, {1, r.height()}}, Theme::getInstance()->bg_darker->background);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue