From 6ffc7de0d85a2ec767fd0797735f689a1b0e80fd Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Wed, 6 May 2026 09:25:19 +0300 Subject: [PATCH] readerview: fix highlight in night mode (#15336) --- frontend/apps/reader/modules/readerview.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/apps/reader/modules/readerview.lua b/frontend/apps/reader/modules/readerview.lua index af2ce8099..fe7750fe4 100644 --- a/frontend/apps/reader/modules/readerview.lua +++ b/frontend/apps/reader/modules/readerview.lua @@ -703,7 +703,7 @@ function ReaderView:drawHighlightRect(bb, _x, _y, rect, drawer, color, draw_note if Blitbuffer.isColor8(color) then bb:paintRect(x, y + h - 1, w, Size.line.thick, color) else - bb:paintRectRGB32(x, y + h - 1, w, Size.line.thick, color) + bb:paintRectRGB32(x, y + h - 1, w, Size.line.thick, Screen.night_mode and color:invert() or color) end elseif drawer == "strikeout" then if not color then @@ -716,7 +716,7 @@ function ReaderView:drawHighlightRect(bb, _x, _y, rect, drawer, color, draw_note if Blitbuffer.isColor8(color) then bb:paintRect(x, line_y, w, Size.line.medium, color) else - bb:paintRectRGB32(x, line_y, w, Size.line.medium, color) + bb:paintRectRGB32(x, line_y, w, Size.line.medium, Screen.night_mode and color:invert() or color) end elseif drawer == "invert" then bb:invertRect(x, y, w, h) @@ -740,7 +740,7 @@ function ReaderView:drawHighlightRect(bb, _x, _y, rect, drawer, color, draw_note if Blitbuffer.isColor8(color) then bb:paintRect(note_mark_pos_x, y, self.note_mark_line_w, rect.h, color) else - bb:paintRectRGB32(note_mark_pos_x, y, self.note_mark_line_w, rect.h, color) + bb:paintRectRGB32(note_mark_pos_x, y, self.note_mark_line_w, rect.h, Screen.night_mode and color:invert() or color) end elseif self.highlight.note_mark == "sidemark" then if draw_note_mark then