Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix screen artifact #28 #29

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ void MENU_AcceptSetting(void)
case MENU_DARK_MODE:
gExtendedSettings.DarkMode = gSettingIndex;
SETTINGS_SaveGlobals();
UI_SetColors(gExtendedSettings.DarkMode);
DrawStatusBar();
MENU_Redraw(true);
break;

case MENU_INITIALIZE:
Expand Down
2 changes: 2 additions & 0 deletions ui/gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ void UI_SetColors(uint8_t DarkMode)

gColorBackground = COLOR_BACKGROUND;
gColorForeground = COLOR_FOREGROUND;

DISPLAY_FillColor(COLOR_BACKGROUND);
}
4 changes: 1 addition & 3 deletions ui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "ui/main.h"
#include "ui/vfo.h"

static void DrawStatusBar(void)
void DrawStatusBar(void)
{
DISPLAY_Fill(0, 159, 0, 96, COLOR_BACKGROUND);
// DISPLAY_DrawRectangle0(0, 41, 160, 1, gSettings.BorderColor);
Expand All @@ -46,8 +46,6 @@ static void DrawStatusBar(void)

void UI_DrawMain(bool bSkipStatus)
{
UI_SetColors(gExtendedSettings.DarkMode);

if (bSkipStatus) {
DISPLAY_Fill(0, 159, 0, 81, COLOR_BACKGROUND);
// DISPLAY_DrawRectangle0(0, 41, 160, 1, gSettings.BorderColor);
Expand Down
1 change: 1 addition & 0 deletions ui/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <stdbool.h>
#include <stdint.h>

void DrawStatusBar(void);
void UI_DrawMain(bool bSkipStatus);
void UI_DrawRepeaterMode(void);
void UI_DrawBattery(void);
Expand Down