Moveable Tabbars, Stretch/Shrink Fix

Added key 'moveable' to tabbars
(tabbars are ordered with margins now, not with anchors to the previous
widget)

If stretching is forbidden by options the mapPanel will now update when
the window is resized
This commit is contained in:
Samuel
2012-10-10 22:20:32 +02:00
parent 478e796dbd
commit f48fb4343f
5 changed files with 98 additions and 7 deletions

View File

@@ -9,7 +9,9 @@ function UISplitter.create()
end
function UISplitter:onHoverChange(hovered)
if hovered then
-- Check if margin can be changed
local margin = (self.vertical and self:getMarginBottom() or self:getMarginRight())
if hovered and (self:canUpdateMargin(margin + 1) ~= margin or self:canUpdateMargin(margin - 1) ~= margin) then
if g_mouse.isCursorChanged() or g_mouse.isPressed() then return end
if self:getWidth() > self:getHeight() then
g_mouse.setVerticalCursor()