mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-20 12:54:33 -04:00
Consolidate styles (#1116)
* Consolidate styles into a Styles class and clean up code * Format * Add style_bg_dark_grey for nav bar * Fix bugs found in PR * Rename styles * Add bg_white style --------- Co-authored-by: kallanreed <kallanreed@outlook.com> Co-authored-by: gullradriel <3157857+gullradriel@users.noreply.github.com>
This commit is contained in:
parent
496b124baf
commit
0f28fefc82
52 changed files with 299 additions and 400 deletions
|
@ -69,9 +69,9 @@ void FreqManUIList::paint(Painter& painter) {
|
|||
if (freqlist_db.size() == 0)
|
||||
return;
|
||||
// coloration if file is too big
|
||||
Style* text_color = &style_default;
|
||||
auto text_color = &Styles::white;
|
||||
if (freqlist_db.size() > FREQMAN_MAX_PER_FILE)
|
||||
text_color = &style_yellow;
|
||||
text_color = &Styles::yellow;
|
||||
uint8_t nb_lines = 0;
|
||||
for (uint8_t it = current_index; it < freqlist_db.size(); it++) {
|
||||
uint8_t line_height = (int)nb_lines * char_height;
|
||||
|
@ -84,7 +84,7 @@ void FreqManUIList::paint(Painter& painter) {
|
|||
Color::white());
|
||||
painter.draw_string(
|
||||
{0, r.location().y() + (int)nb_lines * char_height},
|
||||
style_highlight, description);
|
||||
Styles::bg_white, description);
|
||||
} else {
|
||||
painter.draw_string(
|
||||
{0, r.location().y() + (int)nb_lines * char_height},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue