Optimized the button widget class by switching to using derived properties where possible.