Is there a reason why the size of a Button can be no longer controlled when using loadicon()?
Example: using your demo with width changed to 200

local ui = require "ui"
local win = ui.Window("Button:loadicon() sample", 320, 200)
--local button = ui.Button(win, " Desktop", 110, 80)
local button = ui.Button(win, " Desktop", 20, 60, 200, 100)
button:loadicon(sys.env.USERPROFILE.."\\Desktop\\")
win:show()
repeat
ui.update()
until not win.visible

Yes sorry I had changed in LuaRT 1.9.0 the loadicon() code, so it's a bug
It is now fixed, and I have added the ability for the Button.hastext property, to restore the previous size and text of the button when set to false then true

Powered by: FreeFlarum.
(remove this footer)