Basalt icon indicating copy to clipboard operation
Basalt copied to clipboard

bug: long text on button overflows the button's bounding box

Open luiz00martins opened this issue 1 year ago • 1 comments

Describe the bug

If the text (or value) in the button is longer than its width, the text will overflow the button's bounding box.

Minimal Working Example

-- Basalt configurated installer
local filePath = "/basalt.lua" --here you can change the file path default: basalt
if not(fs.exists(filePath))then
		shell.run("pastebin run ESs1mg7P packed true "..filePath:gsub(".lua", "")) -- this is an alternative to the wget command
end
local basalt = require(filePath:gsub(".lua", ""))

local main = basalt.createFrame("mainFrame")

main:addButton('button')
	:setPosition(20, 8)
	:setSize(10, 3)
	:setValue('some very very long name')

basalt.autoUpdate()

image

Expected behavior

The text would be "cut off" the bounding box of the button. image

Checklist

[✔️] I am running the latest version

luiz00martins avatar Mar 24 '23 04:03 luiz00martins

Hm, it's a good idea and maybe i should implement this. I don't expect the user to have a longer text than the button is - but you're right i should cut it off just in case.

NoryiE avatar Mar 25 '23 11:03 NoryiE