diff --git a/docs/widgets.md b/docs/widgets.md index 63f797574..e7cf964d0 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -299,8 +299,8 @@ Example := Window { ## `TabWidget` -The container for a set of tabs. TabWidget can only have `Tab` elements as children. Only one tab will be rendered at -the time. +TabWidget is a container for a set of tabs. It can only have `Tab` elements as children and only one tab will be visible at +a time. ### Properties of the `Tab` element diff --git a/sixtyfps_compiler/passes/lower_tabwidget.rs b/sixtyfps_compiler/passes/lower_tabwidget.rs index 8d572fbae..6ec6e86fd 100644 --- a/sixtyfps_compiler/passes/lower_tabwidget.rs +++ b/sixtyfps_compiler/passes/lower_tabwidget.rs @@ -71,7 +71,7 @@ fn process_tabwidget( for child in &mut children { if child.borrow().repeated.is_some() { diag.push_error( - "dynamic tabs ('if' or 'for') are not yet supported".into(), + "dynamic tabs ('if' or 'for') are currently not supported".into(), &*child.borrow(), ); continue; diff --git a/sixtyfps_compiler/tests/syntax/elements/tabwidget2.60 b/sixtyfps_compiler/tests/syntax/elements/tabwidget2.60 index 884e683a6..85b96046e 100644 --- a/sixtyfps_compiler/tests/syntax/elements/tabwidget2.60 +++ b/sixtyfps_compiler/tests/syntax/elements/tabwidget2.60 @@ -27,8 +27,8 @@ Test2 := Rectangle { } if (true) : Tab { -// ^error{dynamic tabs \('if' or 'for'\) are not yet supported} +// ^error{dynamic tabs \('if' or 'for'\) are currently not supported} title: "hello"; } } -} \ No newline at end of file +} diff --git a/sixtyfps_runtime/rendering_backends/qt/widgets.rs b/sixtyfps_runtime/rendering_backends/qt/widgets.rs index 50c0f8100..d454175c4 100644 --- a/sixtyfps_runtime/rendering_backends/qt/widgets.rs +++ b/sixtyfps_runtime/rendering_backends/qt/widgets.rs @@ -1913,7 +1913,7 @@ impl Item for NativeTabWidget { option.tabBarRect = QRect(QPoint(), option.tabBarSize); option.rightCornerWidgetSize = QSize(0, 0); option.leftCornerWidgetSize = QSize(0, 0); - QRect contentsRect = style->subElementRect(QStyle::SE_TabWidgetTabContents, &option, nullptr); + QRect contentsRect = style->subElementRect(QStyle::SE_TabWidgetTabContents, &option, nullptr); QRect tabbarRect = style->subElementRect(QStyle::SE_TabWidgetTabBar, &option, nullptr); return {contentsRect, tabbarRect}; }) @@ -2079,8 +2079,6 @@ pub struct NativeTab { pub num_tabs: Property, pub tab_index: Property, pub cached_rendering_data: CachedRenderingData, - /// 0 = Begin, 1 = Middle, 2 = End, 3 = Single - pub tab_position: Property, } impl Item for NativeTab {