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

carlosrovira 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 a9c4c72  jewel-tabbar: add buttons "sameWidths" property to allow 
equal sizes in tab buttons
a9c4c72 is described below

commit a9c4c72a4edff31659f090df8c29c770df3d479e
Author: Carlos Rovira <[email protected]>
AuthorDate: Fri Jun 5 20:06:26 2020 +0200

    jewel-tabbar: add buttons "sameWidths" property to allow equal sizes in tab 
buttons
---
 .../main/royale/org/apache/royale/jewel/TabBar.as  | 27 ++++++++++++++++++++++
 .../JewelTheme/src/main/resources/defaults.css     |  4 ++++
 .../src/main/sass/components-primary/_tabbar.sass  |  4 ++++
 3 files changed, 35 insertions(+)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBar.as 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBar.as
index 2d8ac53..498d859 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBar.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBar.as
@@ -99,5 +99,32 @@ package org.apache.royale.jewel
             _positioner.royale_wrapper = this;
                        _positioner.appendChild(element);
                }
+
+               private var _sameWidths:Boolean = false;
+               /**
+                *  Assigns variable gap to grid from 1 to 20
+                *  Activate "gap-Xdp" effect selector to set a numeric gap 
+                *  between grid cells
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion Royale 0.9.8
+                */
+        public function get sameWidths():Boolean
+        {
+            return _sameWidths;
+        }
+               /**
+         *  @private
+         */
+               public function set sameWidths(value:Boolean):void
+               {
+                       if (value != _sameWidths)
+                       {
+                               _sameWidths = value;
+                               toggleClass("sameWidths", _sameWidths);
+                       }
+               }
        }
 }
diff --git a/frameworks/themes/JewelTheme/src/main/resources/defaults.css 
b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
index 7768110..1be10a0 100644
--- a/frameworks/themes/JewelTheme/src/main/resources/defaults.css
+++ b/frameworks/themes/JewelTheme/src/main/resources/defaults.css
@@ -1159,6 +1159,10 @@ j|FormItem {
     border-radius: 0px;
   }
 }
+.jewel.tabbar.sameWidths .content > * {
+  flex: 1 0 0%;
+}
+
 .jewel.tabbarbutton {
   font-size: 1em;
   font-weight: 500;
diff --git 
a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_tabbar.sass 
b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_tabbar.sass
index 68f7780..5a734f5 100644
--- a/frameworks/themes/JewelTheme/src/main/sass/components-primary/_tabbar.sass
+++ b/frameworks/themes/JewelTheme/src/main/sass/components-primary/_tabbar.sass
@@ -24,6 +24,10 @@
 
 .jewel
     &.tabbar
+        &.sameWidths
+            .content
+                > *
+                    flex: 1 0 0%
 
 // Jewel TabBarButtonItemRenderer
 

Reply via email to