Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMCO: Fix tab alignment #69

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/resources/emco.lua
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,11 @@ function EMCO:addTab(tabName, position)
end
if position == 0 then
table.insert(self.consoles, tabName)
self:createComponentsForTab(tabName)
else
table.insert(self.consoles, position, tabName)
self:reset()
end
self:reset()
self:switchTab(tabName)
end

--- Switches the active, visible tab of the EMCO to tabName
Expand Down Expand Up @@ -1032,6 +1032,8 @@ function EMCO:reset()
self:createComponentsForTab(tabName)
end

self.tabBox:organize()

local default = self.allTabName or self.consoles[1]
self:switchTab(default)
end
Expand All @@ -1041,7 +1043,7 @@ function EMCO:createContainers()
x = 0,
y = 0,
width = "100%",
height = tostring(tonumber(self.tabHeight) + 2) .. "px",
height = tostring(tonumber(self.tabHeight)) .. "px",
name = self.name .. "TabBoxLabel",
}, self)
self.tabBox = Geyser.HBox:new({x = 0, y = 0, width = "100%", height = "100%", name = self.name .. "TabBox"}, self.tabBoxLabel)
Expand Down
Loading