mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
#107 redraw button ends on enable/disable
This commit is contained in:
parent
e983c7f209
commit
532c965827
2 changed files with 13 additions and 1 deletions
|
@ -306,6 +306,18 @@ public class TButton extends 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.
|
||||
*
|
||||
|
|
|
@ -1041,7 +1041,7 @@ public abstract class TWidget implements Comparable<TWidget> {
|
|||
*
|
||||
* @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;
|
||||
if (!enabled) {
|
||||
active = false;
|
||||
|
|
Loading…
Reference in a new issue