Minor Edits to UIMiniWindow

Allow for a double click on the Top Bar of a UIMiniWindow to function
the same as pessing the minimize/maximize button.
This commit is contained in:
Jeffrey 2013-01-07 23:09:00 -06:00
parent 9610106088
commit a1f5a88fe7
2 changed files with 20 additions and 0 deletions

View File

@ -15,6 +15,17 @@ MiniWindow < UIMiniWindow
$on: $on:
image-border-bottom: 2 image-border-bottom: 2
UIWidget
id: miniwindowTopBar
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
margin-right: 3
margin-left: 3
margin-top: 3
size: 258 18
phantom: true
UIButton UIButton
id: closeButton id: closeButton
anchors.top: parent.top anchors.top: parent.top

View File

@ -82,6 +82,15 @@ function UIMiniWindow:setup()
end end
end end
self:getChildById('miniwindowTopBar').onDoubleClick =
function()
if self:isOn() then
self:maximize()
else
self:minimize()
end
end
local oldParent = self:getParent() local oldParent = self:getParent()
local settings = g_settings.getNode('MiniWindows') local settings = g_settings.getNode('MiniWindows')