[Scummvm-cvs-logs] scummvm master -> b46bb554442f4ead6dd26ee46195e636d55fcc06

sev- sev at scummvm.org
Mon May 16 10:09:11 CEST 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e55ec6c6ca GUI: Widget: redraw when setAlign() called
b46bb55444 Merge pull request #722 from Abde-/master


Commit: e55ec6c6ca414b919916363515c7a71e54eaf8e4
    https://github.com/scummvm/scummvm/commit/e55ec6c6ca414b919916363515c7a71e54eaf8e4
Author: Abdeselam El-Haman (aelhaman at gmail.com)
Date: 2016-03-25T02:34:35+01:00

Commit Message:
GUI: Widget: redraw when setAlign() called

Changed paths:
    gui/widget.cpp



diff --git a/gui/widget.cpp b/gui/widget.cpp
index 851774f..9f98298 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -263,9 +263,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);
+	}
+	 
 }
 
 


Commit: b46bb554442f4ead6dd26ee46195e636d55fcc06
    https://github.com/scummvm/scummvm/commit/b46bb554442f4ead6dd26ee46195e636d55fcc06
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T10:09:09+02:00

Commit Message:
Merge pull request #722 from Abde-/master

GUI: Redraw Widget when setAlign() called

Changed paths:
    gui/widget.cpp









More information about the Scummvm-git-logs mailing list