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

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

Open
luiz00martins opened this issue Mar 24, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@luiz00martins
Copy link

luiz00martins commented Mar 24, 2023

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 luiz00martins added the bug Something isn't working label Mar 24, 2023
@NoryiE
Copy link
Collaborator

NoryiE commented Mar 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants