mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 09:07:17 -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
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
#include "ui_styles.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_tabview.hpp"
|
||||
#include "transmitter_model.hpp"
|
||||
|
@ -52,11 +52,7 @@ class RangeView : public View {
|
|||
uint32_t width{};
|
||||
rf::Frequency center{};
|
||||
|
||||
static constexpr Style style_info{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::grey(),
|
||||
};
|
||||
const Style& style_info = Styles::grey;
|
||||
|
||||
Labels labels{
|
||||
{{2 * 8, 8 * 8 + 4}, "Start", Color::light_grey()},
|
||||
|
@ -117,16 +113,8 @@ class JammerView : public View {
|
|||
int16_t mscounter = 0; // euquiq: Internal ms counter for do_timer()
|
||||
lfsr_word_t lfsr_v = 1; // euquiq: Used to generate "random" Jitter
|
||||
|
||||
static constexpr Style style_val{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::green(),
|
||||
};
|
||||
static constexpr Style style_cancel{
|
||||
.font = font::fixed_8x16,
|
||||
.background = Color::black(),
|
||||
.foreground = Color::red(),
|
||||
};
|
||||
const Style& style_val = Styles::green;
|
||||
const Style& style_cancel = Styles::red;
|
||||
|
||||
RangeView view_range_a{nav_};
|
||||
RangeView view_range_b{nav_};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue