diff --git a/docs/changelog.txt b/docs/changelog.txt index 871526c85..b2165b010 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -46,6 +46,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `gui/quickcmd`: now has it's own global keybinding for your convenience: Ctrl-Shift-A - Many DFHack windows can now be unfocused by clicking somewhere not over the tool window. This has the same effect as pinning previously did, but without the extra clicking. - `overlay`: overlay widgets can now specify a default enabled state if they are not already set in the player's overlay config file +-@ New borders for DFHack tool windows -- tell us what you think! ## Documentation diff --git a/library/lua/gui.lua b/library/lua/gui.lua index d870399a3..2cb84d682 100644 --- a/library/lua/gui.lua +++ b/library/lua/gui.lua @@ -888,13 +888,17 @@ THIN_FRAME = make_frame('Thin', false) -- for compatibility with pre-steam code GREY_LINE_FRAME = WINDOW_FRAME -function paint_frame(dc,rect,style,title,inactive, pause_forced) +function paint_frame(dc,rect,style,title,inactive,pause_forced,resizable) 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) dscreen.paintTile(style.rt_frame_pen or pen, x2, y1) dscreen.paintTile(style.lb_frame_pen or pen, x1, y2) - dscreen.paintTile(style.rb_frame_pen or pen, x2, y2) + local rb_frame_pen = style.rb_frame_pen + if rb_frame_pen == WINDOW_FRAME.rb_frame_pen and not resizable then + rb_frame_pen = PANEL_FRAME.rb_frame_pen + end + dscreen.paintTile(rb_frame_pen or pen, x2, y2) dscreen.fillRect(style.t_frame_pen or style.h_frame_pen or pen,x1+1,y1,x2-1,y1) dscreen.fillRect(style.b_frame_pen or style.h_frame_pen or pen,x1+1,y2,x2-1,y2) dscreen.fillRect(style.l_frame_pen or style.v_frame_pen or pen,x1,y1+1,x1,y2-1) diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 473f09db9..653107179 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -502,7 +502,7 @@ function Panel:onRenderFrame(dc, rect) and not self.parent_view:hasFocus() local pause_forced = self.parent_view and self.parent_view.force_pause gui.paint_frame(dc, rect, self.frame_style, self.frame_title, inactive, - pause_forced) + pause_forced, self.resizable) if self.kbd_get_pos then local pos = self.kbd_get_pos() local pen = to_pen{fg=COLOR_GREEN, bg=COLOR_BLACK}