mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 18:28:36 -07:00
GUI: Fix Dark Mode after XOR canvas color
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
- OFW: FBT: Toolchain v39 (by @hedger)
|
- OFW: FBT: Toolchain v39 (by @hedger)
|
||||||
|
|
||||||
### Fixed:
|
### Fixed:
|
||||||
|
- GUI: Fix Dark Mode after XOR canvas color, like in NFC dict attack (by @Willy-JL)
|
||||||
- OFW: NFC: Fix plantain balance string (by @Astrrra)
|
- OFW: NFC: Fix plantain balance string (by @Astrrra)
|
||||||
- OFW: JS: Ensure proper closure of variadic function in `mjs_array` (by @derskythe)
|
- OFW: JS: Ensure proper closure of variadic function in `mjs_array` (by @derskythe)
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,14 @@ void canvas_set_font_direction(Canvas* canvas, CanvasDirection dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void canvas_invert_color(Canvas* canvas) {
|
void canvas_invert_color(Canvas* canvas) {
|
||||||
canvas->fb.draw_color = !canvas->fb.draw_color;
|
if(canvas->fb.draw_color == ColorXOR && momentum_settings.dark_mode) {
|
||||||
|
// XOR is 0x02, invert changes it to 0x00 which is White
|
||||||
|
// Basically like resetting to background color
|
||||||
|
// In Dark Mode, background color is Black instead
|
||||||
|
canvas->fb.draw_color = ColorBlack;
|
||||||
|
} else {
|
||||||
|
canvas->fb.draw_color = !canvas->fb.draw_color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void canvas_set_font(Canvas* canvas, Font font) {
|
void canvas_set_font(Canvas* canvas, Font font) {
|
||||||
|
|||||||
Reference in New Issue
Block a user