I've created the following with the Geyser Framework on Mudlet 3.0 delta using Windows 8 ...
The columns should align with the header as the column's container and the header's container are the same size. But as you can see, they do not. This 'gap' will change in size depending on the size of its container.
This is not the first time I"ve encountered this issue.
Here's the entire script. If you have
Vadi's CSS Manager installed, you can simply copy & paste this in a new script and it should work fine.
sys = {}
sys.census = {}
sys.census.container = Geyser.Container:new({
name = "sys.census.container",
x = 900, y = 500,
width = 600,
height = 200,
})
sys.census.header = Geyser.Container:new({
name = "sys.census.header",
x = 0, y = 0,
width = sys.census.container:get_width(),
height = 26,
},sys.census.container)
sys.census.title = Geyser.Label:new({
name = "sys.census.title",
x = 0, y = 0,
width = "100%",
height = "50%",
},sys.census.header)
sys.census.titleCSS = CSSMan.new([[
background-color: rgb(0,50,100);
]])
sys.census.title:setStyleSheet( sys.census.titleCSS:getCSS() )
local data = {"Ship","T","Avl","Civ","Sci","Mil","Off","Mis","Pln","Ore","Bar","Air","FTn","Cmp","Eng","Lif","Ele","Wpn"}
sys.census.categories = Geyser.Label:new({
name = "sys.census.categories",
x = 0, y = "50%",
width = "100%",
height = "50%",
},sys.census.header)
sys.census.categoriesCSS = CSSMan.new([[
background-color: rgb(0,50,100);
]])
sys.census.categories:setStyleSheet( sys.census.categoriesCSS:getCSS() )
sys.census.body = Geyser.Container:new({
name = "sys.census.body",
x = 0, y = sys.census.header:get_height(),
width = "100%",
height = sys.census.container:get_height() - sys.census.header:get_height(),
},sys.census.container)
sys.census.vbox = Geyser.VBox:new({
name = "sys.census.vbox",
x = 0, y = 0,
width = "100%",
height = "100%",
},sys.census.body)
for i=1, 10 do
sys.census["row"..i] = Geyser.HBox:new({
name = "sys.census.row"..i,
},sys.census.vbox)
end
for i=1, 10 do
for k,v in pairs(data) do
sys.census[v..i] = Geyser.Label:new({
name = "sys.census."..v..i,
},sys.census["row"..i])
sys.census[v..i.."CSS"] = CSSMan.new([[
background-color: rgb(0,50,100);
border-color: white;
border-style: dotted;
border-right-width: 2px;
]])
if color then
color = false
sys.census[v..i.."CSS"]:set("background-color","rgb(0,50,100)")
sys.census[v..i]:setStyleSheet(sys.census[v..i.."CSS"]:getCSS())
else
color = true
sys.census[v..i.."CSS"]:set("background-color","rgb(0,25,50)")
sys.census[v..i]:setStyleSheet(sys.census[v..i.."CSS"]:getCSS())
end
if v=="Wpn" then
sys.census[v..i.."CSS"]:set("border-right-width","0px")
sys.census[v..i]:setStyleSheet(sys.census[v..i.."CSS"]:getCSS())
end
if v=="Ship" then
sys.census[v..i].h_stretch_factor = 2.0
end
end
end