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 076ca69371 FontSize looks up size already so no need to duplicate that
076ca69371 is described below

commit 076ca693710f9ae259029a8cf5374924ba1ece32
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue Apr 14 17:51:05 2026 +0300

    FontSize looks up size already so no need to duplicate that
---
 .../org/apache/royale/style/skins/CardTitleSkin.as | 31 +++++-----------------
 1 file changed, 6 insertions(+), 25 deletions(-)

diff --git 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardTitleSkin.as
 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardTitleSkin.as
index 6aeba929a8..b350f22600 100644
--- 
a/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardTitleSkin.as
+++ 
b/frameworks/projects/Style/src/main/royale/org/apache/royale/style/skins/CardTitleSkin.as
@@ -47,33 +47,14 @@ package org.apache.royale.style.skins
 
                private function applyStyles():void
                {
-                       var size:Number = 16 * getMultiplier();
-                       var fontSize:String = computeSize(size * 1.125, 
host.unit);
-
-                       _styles = [
-                               new FontSize(fontSize),
-                               new FontWeight("600")
-                       ];
-                       host.setStyles(_styles);
-               }
-
-               private function getMultiplier():Number
-               {
-                       switch(host.size)
+                       if(!_styles)
                        {
-                               case "xs":
-                                       return 0.75;
-                               case "sm":
-                                       return 0.875;
-                               case "md":
-                                       return 1;
-                               case "lg":
-                                       return 1.125;
-                               case "xl":
-                                       return 1.25;
-                               default:
-                                       return 1;
+                               _styles = [
+                                       new FontSize(host.size || "base"),
+                                       new FontWeight("600")
+                               ];
                        }
+                       host.setStyles(_styles);
                }
        }
 }

Reply via email to