From b5ac7928537236844809505d76f185046f0d7746 Mon Sep 17 00:00:00 2001 From: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:12:40 -0600 Subject: [PATCH] Add color to position info lines in Notepad (#1902) --- firmware/application/apps/ui_text_editor.cpp | 3 +++ firmware/application/ui/ui_styles.cpp | 6 ++++++ firmware/application/ui/ui_styles.hpp | 3 +++ 3 files changed, 12 insertions(+) diff --git a/firmware/application/apps/ui_text_editor.cpp b/firmware/application/apps/ui_text_editor.cpp index ba20952e..a1584853 100644 --- a/firmware/application/apps/ui_text_editor.cpp +++ b/firmware/application/apps/ui_text_editor.cpp @@ -427,6 +427,9 @@ TextEditorView::TextEditorView(NavigationView& nav) &text_size, }); + text_position.set_style(&Styles::bg_dark_blue); + text_size.set_style(&Styles::bg_dark_blue); + viewer.set_font_zoom(enable_zoom); viewer.on_select = [this]() { diff --git a/firmware/application/ui/ui_styles.cpp b/firmware/application/ui/ui_styles.cpp index c0850035..e20f1f3f 100644 --- a/firmware/application/ui/ui_styles.cpp +++ b/firmware/application/ui/ui_styles.cpp @@ -86,6 +86,12 @@ const Style Styles::bg_blue{ .foreground = Color::white(), }; +const Style Styles::bg_dark_blue{ + .font = font::fixed_8x16, + .background = Color::dark_blue(), + .foreground = Color::white(), +}; + const Style Styles::light_grey{ .font = font::fixed_8x16, .background = Color::black(), diff --git a/firmware/application/ui/ui_styles.hpp b/firmware/application/ui/ui_styles.hpp index b27018f2..a04090dd 100644 --- a/firmware/application/ui/ui_styles.hpp +++ b/firmware/application/ui/ui_styles.hpp @@ -58,6 +58,9 @@ class Styles { /* Blue background. */ static const Style bg_blue; + /* Dark blue background. */ + static const Style bg_dark_blue; + /* Light grey foreground. */ static const Style light_grey;