royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 02/04: a way for ProgrammaticSkins to force a redraw
Date Thu, 01 Nov 2018 21:50:16 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit dba1bea34c0e884632237ca0826034d92a8642cb
Author: Alex Harui <aharui@apache.org>
AuthorDate: Thu Nov 1 14:47:45 2018 -0700

    a way for ProgrammaticSkins to force a redraw
---
 .../projects/MXRoyale/src/main/royale/mx/core/UIComponent.as       | 7 ++++++-
 .../projects/MXRoyale/src/main/royale/mx/skins/ProgrammaticSkin.as | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 7404dd1..660a71b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -461,6 +461,7 @@ public class UIComponent extends UIBase
     IFlexDisplayObject,
     IInvalidating,
     IStatesObject,
+    ISimpleStyleClient,
     IUIComponent, IVisualElement, IFlexModule
 {
     //--------------------------------------------------------------------------
@@ -3431,6 +3432,8 @@ COMPILE::JS
         trace("invalidateParentSizeAndDisplayList not implemented");
     }
 
+    protected var invalidateDisplayListFlag:Boolean = false;
+    
     /**
      *  Marks a component so that its <code>updateDisplayList()</code>
      *  method gets called during a later screen update.
@@ -3456,6 +3459,7 @@ COMPILE::JS
     public function invalidateDisplayList():void
     {
         trace("invalidateDisplayList not implemented");
+        invalidateDisplayListFlag = true;
     }
 
     /**
@@ -3959,7 +3963,8 @@ COMPILE::JS
     protected function updateDisplayList(unscaledWidth:Number,
                                         unscaledHeight:Number):void
     {
-        trace("updateDisplayList not implemented");                    
+        trace("updateDisplayList not implemented");  
+        invalidateDisplayListFlag = false;
     }
 
     
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/skins/ProgrammaticSkin.as b/frameworks/projects/MXRoyale/src/main/royale/mx/skins/ProgrammaticSkin.as
index 6b50688..9dc0ac8 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/skins/ProgrammaticSkin.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/skins/ProgrammaticSkin.as
@@ -455,7 +455,7 @@ public class ProgrammaticSkin extends UIComponent
 		
         super.setActualSize(newWidth, newHeight);
         
-		if (changed)
+		if (changed || invalidateDisplayListFlag)
 			updateDisplayList(width, height); // was invalidateDisplayList
 	}
 


Mime
View raw message