diff --git a/docs/changelog.txt b/docs/changelog.txt index 42ce711eb..8cb68fdb2 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -60,6 +60,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `gui/blueprint`: recording of stockpile layouts and categories is now supported. note that detailed stockpile configurations will *not* be saved (yet) - Core: For debugging purposes, you can now pass ``--disable-dfhack`` on the Dwarf Fortress commandline or specify ``DFHACK_DISABLE=1`` in the environment to disable DFHack for the current session. - `overlay`: added links to the quickstart guide and the control panel on the DF title screen +- Window behavior: non-resizable windows now allow dragging by their frame edges by default - `gui/autodump`: fort-mode keybinding: Ctrl-H ## Documentation diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index 1c1d75358..538fa08d8 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -4503,7 +4503,7 @@ Has attributes: Called from ``postComputeFrame``. * ``draggable = bool`` (default: ``false``) -* ``drag_anchors = {}`` (default: ``{title=true, frame=false, body=false}``) +* ``drag_anchors = {}`` (default: ``{title=true, frame=false/true, body=true}``) * ``drag_bound = 'frame' or 'body'`` (default: ``'frame'``) * ``on_drag_begin = function()`` (default: ``nil``) * ``on_drag_end = function(bool)`` (default: ``nil``) @@ -4511,7 +4511,7 @@ Has attributes: If ``draggable`` is set to ``true``, then the above attributes come into play when the panel is dragged around the screen, either with the mouse or the keyboard. ``drag_anchors`` sets which parts of the panel can be clicked on - with the left mouse button to start dragging. ``drag_bound`` configures + with the left mouse button to start dragging. The frame is a drag anchor by default only if ``resizable`` (below) is ``false``. ``drag_bound`` configures whether the frame of the panel (if any) can be dragged outside the containing parent's boundary. The body will never be draggable outside of the parent, but you can allow the frame to cross the boundary by setting ``drag_bound`` to diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 5c8094d28..a58ac228c 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -87,7 +87,7 @@ Panel.ATTRS { function Panel:init(args) if not self.drag_anchors then - self.drag_anchors = {title=true, frame=false, body=true} + self.drag_anchors = {title=true, frame=not self.resizable, body=true} end if not self.resize_anchors then self.resize_anchors = {t=false, l=true, r=true, b=true}