!2144 修复tabbar下划线位置不对问题

Merge pull request !2144 from 图恩/master
This commit is contained in:
openharmony_ci
2022-04-06 09:58:30 +00:00
committed by Gitee
@@ -570,7 +570,8 @@ Offset RenderTabBar::MakeIndicatorOffset(const RefPtr<RenderNode>& item) const
indicator_->GetLayoutSize(), Alignment::CENTER);
}
if (indicatorStyle_ == TabBarIndicatorStyle::DEFAULT &&
(!onFocused_ || SystemProperties::GetDeviceType() == DeviceType::PHONE)) {
(!onFocused_ || SystemProperties::GetDeviceType() == DeviceType::PHONE ||
SystemProperties::GetDeviceType() == DeviceType::TABLET)) {
Size childSize = GetTabItemChildLayoutSize(item);
offset +=
Offset(0.0, childSize.Height() / DOUBLE_FACTOR) + indicatorPadding_.GetOffsetInPx(context->GetDipScale());