diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/widget.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 03540f7b91..dda44604c8 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -265,9 +265,17 @@ void StaticTextWidget::setLabel(const Common::String &label) { } void StaticTextWidget::setAlign(Graphics::TextAlign align) { - _align = align; - // TODO: We should automatically redraw when the alignment is changed. - // See setLabel() for more insights. + if (_align != align){ + _align = align; + + // same as setLabel() actually, the text + // would be redrawn on top of the old one so + // we add the CLEARBG flag + setFlags(WIDGET_CLEARBG); + draw(); + clearFlags(WIDGET_CLEARBG); + } + } |