Skip to content

Commit 3b93b3e

Browse files
committed
allow tabview to use a margin for tabbar size
1 parent 1af2762 commit 3b93b3e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

haxe/ui/containers/TabView.hx

+9-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ private class Layout extends DefaultLayout {
7272
}
7373

7474
var usableSize = usableSize;
75-
tabs.width = usableSize.width;
75+
76+
var tabsWidthModifier:Float = 0;
77+
if (tabs.style == null) {
78+
tabs.validateNow();
79+
}
80+
if (tabs.marginRight != null) {
81+
tabsWidthModifier = tabs.marginRight;
82+
}
83+
tabs.width = usableSize.width - tabsWidthModifier;
7684

7785
if (component.autoHeight == false) {
7886
content.height = usableSize.height + 1;

0 commit comments

Comments
 (0)