This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
     new a759d699ac Don't override styles if they already exist
a759d699ac is described below

commit a759d699acd20066170c1ec07b92eb46e2135521
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue Apr 14 17:53:46 2026 +0300

    Don't override styles if they already exist
---
 .../apache/royale/style/skins/CardActionsSkin.as   | 13 ++++++-----
 .../org/apache/royale/style/skins/CardBodySkin.as  | 15 +++++++------
 .../org/apache/royale/style/skins/CardSkin.as      | 25 ++++++++++++----------
 3 files changed, 31 insertions(+), 22 deletions(-)

diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardActionsSkin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardActionsSkin.as
index 8f0d5618c0..96e788a5f9 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardActionsSkin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardActionsSkin.as
@@ -50,11 +50,14 @@ package org.apache.royale.style.skins
                {
                        var gapVal:String = computeSize(8, host.unit);
 
-                       _styles = [
-                               new Display("flex"),
-                               new JustifyContent("end"),
-                               new Gap(gapVal)
-                       ];
+                       if(!_styles)
+                       {
+                               _styles = [
+                                       new Display("flex"),
+                                       new JustifyContent("end"),
+                                       new Gap(gapVal)
+                               ];
+                       }
                        host.setStyles(_styles);
                }
        }
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardBodySkin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardBodySkin.as
index f6e2c7cf8b..27db11b7b0 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardBodySkin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardBodySkin.as
@@ -56,12 +56,15 @@ package org.apache.royale.style.skins
                        var padding:Padding = new Padding();
                        padding.padding = paddingVal;
 
-                       _styles = [
-                               new Display("flex"),
-                               new FlexDirection("column"),
-                               new Gap(gapVal),
-                               padding
-                       ];
+                       if(!_styles)
+                       {
+                               _styles = [
+                                       new Display("flex"),
+                                       new FlexDirection("column"),
+                                       new Gap(gapVal),
+                                       padding
+                               ];
+                       }
                        host.setStyles(_styles);
                }
 
diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardSkin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardSkin.as
index 8842d563e4..7472304ea8 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardSkin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardSkin.as
@@ -69,17 +69,20 @@ package org.apache.royale.style.skins
                        dashBorder.style = "dashed";
                        dashBorder.width = "1px";
 
-                       _styles = [
-                               new Display("flex"),
-                               new FlexDirection("column"),
-                               new Overflow("hidden"),
-                               new BorderRadius(computeSize(8, host.unit)),
-                               new BackgroundColor(bgColor.colorSpecifier),
-                               defaultBorder,
-                               new DataState("dash", [
-                                       dashBorder
-                               ])
-                       ];
+                       if(!_styles)
+                       {
+                               _styles = [
+                                       new Display("flex"),
+                                       new FlexDirection("column"),
+                                       new Overflow("hidden"),
+                                       new BorderRadius(computeSize(8, 
host.unit)),
+                                       new 
BackgroundColor(bgColor.colorSpecifier),
+                                       defaultBorder,
+                                       new DataState("dash", [
+                                               dashBorder
+                                       ])
+                               ];
+                       }
                        host.setStyles(_styles);
                }
        }

Reply via email to