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
|
@ -40,13 +40,13 @@ namespace ui {
|
|||
|
||||
/* Gets a style indicating total TX gain level. */
|
||||
static const Style* get_style_for_gain(uint8_t tot_gain) {
|
||||
if (tot_gain > POWER_THRESHOLD_HIGH) return &Styles::red;
|
||||
if (tot_gain > POWER_THRESHOLD_HIGH) return Theme::getInstance()->fg_red;
|
||||
|
||||
if (tot_gain > POWER_THRESHOLD_MED)
|
||||
return &Styles::orange;
|
||||
return Theme::getInstance()->fg_orange;
|
||||
|
||||
if (tot_gain > POWER_THRESHOLD_LOW)
|
||||
return &Styles::yellow;
|
||||
return Theme::getInstance()->fg_yellow;
|
||||
|
||||
return nullptr; // Uses default.
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ void TransmitterView::paint(Painter& painter) {
|
|||
painter.draw_bitmap(
|
||||
pos,
|
||||
bitmap_stripes,
|
||||
ui::Color(191, 191, 0),
|
||||
ui::Color::black());
|
||||
Theme::getInstance()->fg_yellow->foreground,
|
||||
Theme::getInstance()->fg_yellow->background);
|
||||
if (c != 9)
|
||||
pos += {24, 0};
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue