mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 18:59:20 +02:00
Bot file name update, saving height for containers
This commit is contained in:
parent
407553647d
commit
8fa45f387d
@ -184,7 +184,7 @@ function UIMiniWindow:setup()
|
|||||||
self.miniLoaded = true
|
self.miniLoaded = true
|
||||||
|
|
||||||
if self.save then
|
if self.save then
|
||||||
if oldParent and oldParent:getClassName() == 'UIMiniWindowContainer' and not self.containerWindow then
|
if oldParent and oldParent:getClassName() == 'UIMiniWindowContainer' then
|
||||||
addEvent(function() oldParent:order() end)
|
addEvent(function() oldParent:order() end)
|
||||||
end
|
end
|
||||||
if newParent and newParent:getClassName() == 'UIMiniWindowContainer' and newParent ~= oldParent then
|
if newParent and newParent:getClassName() == 'UIMiniWindowContainer' and newParent ~= oldParent then
|
||||||
|
@ -167,7 +167,8 @@ function onContainerOpen(container, previousContainer)
|
|||||||
containerWindow:setContentMinimumHeight(cellSize.height)
|
containerWindow:setContentMinimumHeight(cellSize.height)
|
||||||
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
|
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
|
||||||
|
|
||||||
if not previousContainer then
|
local hasHeightInSettings = containerWindow:getSettings("height")
|
||||||
|
if not previousContainer and not hasHeightInSettings then
|
||||||
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
|
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
|
||||||
containerWindow:setContentHeight(filledLines*cellSize.height)
|
containerWindow:setContentHeight(filledLines*cellSize.height)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user