This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch mx_list_item_renderer
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/mx_list_item_renderer by this
push:
new 239cc85 Resize TabBar according to contentView
239cc85 is described below
commit 239cc85fd7f4eda959ec786a4cc275826b1481d7
Author: DESKTOP-RH4S838\Yishay <[email protected]>
AuthorDate: Fri Oct 4 15:18:44 2019 +0300
Resize TabBar according to contentView
Reference #475
---
.../src/main/royale/spark/components/TabBar.as | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TabBar.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TabBar.as
index 8baaab3..ca40a6a 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TabBar.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TabBar.as
@@ -40,6 +40,10 @@ use namespace mx_internal; //
ListBase/setCurrentCaretIndex(index);
*/
import mx.managers.IFocusManagerComponent;
import spark.components.supportClasses.ListBase;
+import spark.layouts.supportClasses.LayoutBase;
+import org.apache.royale.core.ILayoutHost;
+import org.apache.royale.core.IStrand;
+import mx.core.IUIComponent;
/**
* Defines the radius of the TabBar buttons' top-left and top-right corners
for the default
* TabBarButton skin.
@@ -185,5 +189,16 @@ public class TabBar extends ListBase implements
IFocusManagerComponent
if (TabBar.createAccessibilityImplementation != null)
TabBar.createAccessibilityImplementation(this);
} */
+
+ override public function get measuredWidth():Number
+ {
+ var contentView:IUIComponent = (this.view as ILayoutHost).contentView
as IUIComponent;
+ if (contentView)
+ {
+ (contentView.getBeadByType(LayoutBase) as LayoutBase).measure();
+ measuredWidth = contentView.measuredWidth;
+ }
+ return super.measuredWidth;
+ }
}
}
\ No newline at end of file