use a black background for non-top ZScreen titles

develop
Myk Taylor 2023-01-06 18:58:08 -08:00
parent 810430f1a2
commit 093eac3eb2
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 8 additions and 3 deletions

@ -785,12 +785,13 @@ GREY_LINE_FRAME = {
rt_frame_pen = to_pen{ tile=903, ch=187, fg=COLOR_GREY, bg=COLOR_BLACK },
rb_frame_pen = to_pen{ tile=917, ch=188, fg=COLOR_GREY, bg=COLOR_BLACK },
title_pen = to_pen{ fg=COLOR_BLACK, bg=COLOR_GREY },
inactive_title_pen = to_pen{ fg=COLOR_GREY, bg=COLOR_BLACK },
signature_pen = to_pen{ fg=COLOR_GREY, bg=COLOR_BLACK },
locked_pen = to_pen{tile=779, ch=216, fg=COLOR_GREY, bg=COLOR_GREEN},
unlocked_pen = to_pen{tile=782, ch=216, fg=COLOR_GREY, bg=COLOR_BLACK},
}
function paint_frame(dc,rect,style,title,show_lock,locked)
function paint_frame(dc,rect,style,title,show_lock,locked,inactive)
local pen = style.frame_pen
local x1,y1,x2,y2 = dc.x1+rect.x1, dc.y1+rect.y1, dc.x1+rect.x2, dc.y1+rect.y2
dscreen.paintTile(style.lt_frame_pen or pen, x1, y1)
@ -811,7 +812,8 @@ function paint_frame(dc,rect,style,title,show_lock,locked)
if #tstr > x2-x1-1 then
tstr = string.sub(tstr,1,x2-x1-1)
end
dscreen.paintString(style.title_pen or pen, x, y1, tstr)
dscreen.paintString(inactive and style.inactive_title_pen or style.title_pen or pen,
x, y1, tstr)
end
if show_lock then

@ -469,7 +469,10 @@ function Panel:onRenderFrame(dc, rect)
if self.lockable then
locked = self.parent_view and self.parent_view.locked
end
gui.paint_frame(dc, rect, self.frame_style, self.frame_title, self.lockable, locked)
local inactive = self.parent_view and self.parent_view.isOnTop
and not self.parent_view:isOnTop()
gui.paint_frame(dc, rect, self.frame_style, self.frame_title,
self.lockable, locked, inactive)
if self.kbd_get_pos then
local pos = self.kbd_get_pos()
local pen = to_pen{fg=COLOR_GREEN, bg=COLOR_BLACK}