From 08a2435e9defc21a1a7fbb8cf9119b940c3423f3 Mon Sep 17 00:00:00 2001 From: wzztoone Date: Wed, 6 Apr 2022 17:00:31 +0800 Subject: [PATCH] fix tabbar Signed-off-by: wzztoone Change-Id: I2dd067a603892d3b283d92704cf701c588186cd7 --- frameworks/core/components/tab_bar/render_tab_bar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frameworks/core/components/tab_bar/render_tab_bar.cpp b/frameworks/core/components/tab_bar/render_tab_bar.cpp index 43fe7786..8c963aa6 100644 --- a/frameworks/core/components/tab_bar/render_tab_bar.cpp +++ b/frameworks/core/components/tab_bar/render_tab_bar.cpp @@ -570,7 +570,8 @@ Offset RenderTabBar::MakeIndicatorOffset(const RefPtr& 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());