remove references to pinnable

develop
Myk Taylor 2023-01-23 19:34:48 -08:00
parent 1fa71c0d92
commit f39eb42889
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 5 additions and 18 deletions

@ -4392,11 +4392,6 @@ Has attributes:
hitting :kbd:`Esc` (while resizing with the mouse or keyboard), or by calling
``Panel:setKeyboardResizeEnabled(false)`` (while resizing with the keyboard).
* ``pinnable = bool`` (default: ``false``)
Determines whether the panel will draw a pin icon in its frame. See
`ZScreen class`_ for details.
* ``autoarrange_subviews = bool`` (default: ``false``)
* ``autoarrange_gap = int`` (default: ``0``)
@ -4458,7 +4453,7 @@ Window class
------------
Subclass of Panel; sets Panel attributes to useful defaults for a top-level
framed, pinnable, draggable window.
framed, draggable window.
ResizingPanel class
-------------------

@ -81,7 +81,6 @@ Panel.ATTRS {
resize_min = DEFAULT_NIL,
on_resize_begin = DEFAULT_NIL,
on_resize_end = DEFAULT_NIL,
pinnable = false,
autoarrange_subviews = false, -- whether to automatically lay out subviews
autoarrange_gap = 0, -- how many blank lines to insert between widgets
}
@ -272,21 +271,21 @@ local function Panel_on_double_click(self)
Panel_update_frame(self, frame, true)
end
local function panel_is_on_pin(self)
local function panel_mouse_is_on_pause_icon(self)
local frame_rect = self.frame_rect
local x,y = dscreen.getMousePos()
return (x == frame_rect.x2-2 or x == frame_rect.x2-1)
and (y == frame_rect.y1-1 or y == frame_rect.y1)
end
local function panel_is_pinnable(self)
return self.pinnable and self.parent_view and self.parent_view.togglePinned
local function panel_has_pause_icon(self)
return self.parent_view and self.parent_view.force_pause
end
function Panel:getMouseFramePos()
local x,y = Panel.super.getMouseFramePos(self)
if x then return x, y end
if panel_is_pinnable(self) and panel_is_on_pin(self) then
if panel_has_pause_icon(self) and panel_mouse_is_on_pause_icon(self) then
local frame_rect = self.frame_rect
return frame_rect.width - 3, 0
end
@ -320,12 +319,6 @@ function Panel:onInput(keys)
end
return true
end
if panel_is_pinnable(self) and keys._MOUSE_L_DOWN then
if panel_is_on_pin(self) then
self.parent_view:togglePinned()
return true
end
end
if Panel.super.onInput(self, keys) then
return true
end
@ -532,7 +525,6 @@ Window.ATTRS {
frame_background = gui.CLEAR_PEN,
frame_inset = 1,
draggable = true,
pinnable = true,
}
-------------------