Apply suggestions from code review

Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
This commit is contained in:
Olivier Goffart 2021-08-06 13:54:02 +02:00 committed by Olivier Goffart
parent 63db0959f9
commit a89d83e58f
4 changed files with 6 additions and 8 deletions

View file

@ -299,8 +299,8 @@ Example := Window {
## `TabWidget` ## `TabWidget`
The container for a set of tabs. TabWidget can only have `Tab` elements as children. Only one tab will be rendered at 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
the time. a time.
### Properties of the `Tab` element ### Properties of the `Tab` element

View file

@ -71,7 +71,7 @@ fn process_tabwidget(
for child in &mut children { for child in &mut children {
if child.borrow().repeated.is_some() { if child.borrow().repeated.is_some() {
diag.push_error( 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(), &*child.borrow(),
); );
continue; continue;

View file

@ -27,7 +27,7 @@ Test2 := Rectangle {
} }
if (true) : Tab { 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"; title: "hello";
} }
} }

View file

@ -2079,8 +2079,6 @@ pub struct NativeTab {
pub num_tabs: Property<i32>, pub num_tabs: Property<i32>,
pub tab_index: Property<i32>, pub tab_index: Property<i32>,
pub cached_rendering_data: CachedRenderingData, pub cached_rendering_data: CachedRenderingData,
/// 0 = Begin, 1 = Middle, 2 = End, 3 = Single
pub tab_position: Property<i32>,
} }
impl Item for NativeTab { impl Item for NativeTab {