#107 redraw button ends on enable/disable

This commit is contained in:
Autumn Lamonte 2022-02-06 13:25:22 -06:00
parent e983c7f209
commit 532c965827
2 changed files with 13 additions and 1 deletions

View file

@ -306,6 +306,18 @@ public class TButton extends TWidget {
// TWidget ---------------------------------------------------------------- // TWidget ----------------------------------------------------------------
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
/**
* Override TWidget.setActive() so that the button ends are redrawn.
*
* @param enabled if true, this widget can be tabbed to or receive events
*/
@Override
public void setEnabled(final boolean enabled) {
super.setEnabled(enabled);
rightEdgeShadowCharBottom = null;
shadowColor = null;
}
/** /**
* Override TWidget's width: we can only set width at construction time. * Override TWidget's width: we can only set width at construction time.
* *

View file

@ -1041,7 +1041,7 @@ public abstract class TWidget implements Comparable<TWidget> {
* *
* @param enabled if true, this widget can be tabbed to or receive events * @param enabled if true, this widget can be tabbed to or receive events
*/ */
public final void setEnabled(final boolean enabled) { public void setEnabled(final boolean enabled) {
this.enabled = enabled; this.enabled = enabled;
if (!enabled) { if (!enabled) {
active = false; active = false;