Has anybody encountered a problem when assigning images to a vbox? I have the strangest issue here and for the life of me, I can't work out why it's doing this.
Here's my element:
http://imgur.com/0Cj513O
You'll see that three of the images are not displaying. My function is running through a for loop which makes this a double o.O.
Here's the function in question:
function draw_toggle_icons()
local imgs = {
"visualalerts",
"genrunner",
"autobasher",
"clanannounce",
"combatmode",
"paused"
}
for _, icon in ipairs(imgs) do
vboxes.tparent[icon] = Geyser.Label:new({
name = string.format("vboxes.tparent.%s", icon),
}, vboxes.tparent)
end
for _, t in ipairs(imgs) do
vboxes.tparent[t]:setStyleSheet([[
QLabel{
border-color: rgb(75, 0, 130);
border-width: 3px;
border-style: solid;
border-radius: 12px;
image: url("]] .. imagedir .. t .. [[_on.png");
}
QLabel::hover{
border-color: rgb(244, 164, 96);
border-width: 2px;
border-style: solid;
border-radius: 12px;
image: url("]] .. imagedir .. t .. [[_off.png");
}
]])
end
end
And the parents:
Container:
containers.toggles = Geyser.Container:new({
name = "containers.toggles",
x = "0%", y = "50%",
width = "2%", height = "46%"
}, containers.main)
VBox:
function draw_toggles_vbox()
vboxes.tparent = Geyser.VBox:new({
name = "vboxes.tparent",
x = "0%", y = "0%",
width = "100%", height = "100%"
}, containers.toggles)
end
I've confirmed that everything is as it should be via the following methods:
lfs.attributes() on -all- image paths. All check out.
echo() out pertinent strings and tables. Again, all fine.
Passed the flash method to each label. Ditto.
I should add, these very same functions work just fine in Linux, suggesting a path/separator issue, but that also has been ruled out and further confirmed by the fact in Windows, it does at least show some of the images.
Am I missing something here?