plugdata icon indicating copy to clipboard operation
plugdata copied to clipboard

atom box width is not in 'digits' (or 'chars')

Open porres opened this issue 1 year ago • 2 comments

In Vanilla, an atom box is created with a default width of 5 digits, and digits is the unit of width.

In Plugdata the width is in 'chars', and not 'digits'. I don't know why, as only numbers (digits) can be displayed, but I'm assuming it's because the symbol and list versions also have 'chars'...

Anyway, problem is that this is not true and if you create an atom number box set it's font size to 36, you'll see it can only display a single digit...

This pretty much ruins patches made in Vanilla to be opened in PlugData and vice versa. Number boxes are too small if designed and saved in Vanilla and opened in PlugData, or ridiculously big if the contrary happens.

I can see this extends to symbol box, list box and also iemgui's number box, so please fix this for better patch interchangeability and compatibility between Vanilla and PlugData.

This issue relates to https://github.com/plugdata-team/plugdata/issues/1657

porres avatar Jun 25 '24 08:06 porres

In Plugdata the width is in 'chars', and not 'digits'. I don't know why, as only numbers (digits) can be displayed, but I'm assuming it's because the symbol and list versions also have 'chars'...

Yeah, that is the reason. I think it's mostly semantics because "digits" and "chars" would always mean the same thing here anyway. So maybe better to use the same terminology across all atoms, since in practice it does the same thing.

Anyway, problem is that this is not true and if you create an atom number box set it's font size to 36, you'll see it can only display a single digit...

Working on a fix!

timothyschoen avatar Jun 25 '24 11:06 timothyschoen

https://github.com/plugdata-team/plugdata/assets/44585538/f325fe6e-be1d-4956-adae-b865d324e825

This will at least display patches better, but drag-resizing is still a bit janky

timothyschoen avatar Jun 25 '24 11:06 timothyschoen

hey, it seems this has been fixed, rigth?

porres avatar Nov 26 '24 08:11 porres

Yep!

timothyschoen avatar Dec 04 '24 12:12 timothyschoen