Skip to content

Commit

Permalink
Fix screen artifact #28
Browse files Browse the repository at this point in the history
  • Loading branch information
reppad committed Nov 21, 2023
1 parent 43137ff commit 253feec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
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

0 comments on commit 253feec

Please sign in to comment.