Skip to content

Bugfix - ofxToggle/ofxButton size changes properly update checkbox size#8503

Merged
ofTheo merged 4 commits intoopenframeworks:masterfrom
fearn-e:bugfix-update-ui-sizes
Feb 6, 2026
Merged

Bugfix - ofxToggle/ofxButton size changes properly update checkbox size#8503
ofTheo merged 4 commits intoopenframeworks:masterfrom
fearn-e:bugfix-update-ui-sizes

Conversation

@fearn-e
Copy link
Contributor

@fearn-e fearn-e commented Feb 5, 2026

When ofxToggle/ofxButton were resized, it never changed the checkboxRect value. It was only originally set in the Setup function, leading to having to retrigger Setup for any buttons and toggles.

Fix is to create overrides for the setSize function from ofxBaseGui, for ofxToggle and ofxButton.

Tested only on Windows, compiles and works fine, though I doubt it should have any issues on other OSs.

First PR for OF, so hopefully I did everything right. 🙂

@fearn-e fearn-e closed this Feb 5, 2026
@ofTheo
Copy link
Member

ofTheo commented Feb 5, 2026

curious why this was closed - thanks @fearn-e

@fearn-e
Copy link
Contributor Author

fearn-e commented Feb 5, 2026

@ofTheo noticed the github actions were flagging errors with some of the builds, didn't want to waste the maintainers' time so thought I'd close it while I double checked what went wrong. Full disclosure -- was hoping no one would notice!

@ofTheo
Copy link
Member

ofTheo commented Feb 5, 2026

No problem!!
Looks like you used ofxToggle::setSize instead of ofxButton::setSize in ofxButton.cpp

@fearn-e
Copy link
Contributor Author

fearn-e commented Feb 5, 2026

No problem!! Looks like you used ofxToggle::setSize instead of ofxButton::setSize in ofxButton.cpp

Ah, thank you, serves me right for opening a PR at the end of the day, I'll fix and reopen it in the morning 😄

@fearn-e fearn-e reopened this Feb 6, 2026
@fearn-e
Copy link
Contributor Author

fearn-e commented Feb 6, 2026

Should be all good now!

@ofTheo ofTheo merged commit aaf8228 into openframeworks:master Feb 6, 2026
17 checks passed
@ofTheo
Copy link
Member

ofTheo commented Feb 6, 2026

Thanks @fearn-e !

@fearn-e fearn-e deleted the bugfix-update-ui-sizes branch February 13, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants