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`
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

View file

@ -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;

View file

@ -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";
}
}
}
}

View file

@ -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<i32>,
pub tab_index: Property<i32>,
pub cached_rendering_data: CachedRenderingData,
/// 0 = Begin, 1 = Middle, 2 = End, 3 = Single
pub tab_position: Property<i32>,
}
impl Item for NativeTab {