From 93decd2177c2910d594b61181179799bf99f9cc7 Mon Sep 17 00:00:00 2001 From: openharmony_ci <120357966@qq.com> Date: Mon, 28 Aug 2023 07:58:39 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!18487?= =?UTF-8?q?=20:=20=E3=80=90Dialog=E3=80=91=E4=BF=AE=E5=A4=8D=E5=BC=B9?= =?UTF-8?q?=E6=A1=86DEFAULT=E4=BD=8D=E7=BD=AE=E5=9C=A8api9=E4=B8=8A?= =?UTF-8?q?=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components_ng/pattern/dialog/dialog_layout_algorithm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp index d1932f979a1..3512613fe6c 100644 --- a/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp @@ -48,7 +48,6 @@ constexpr double DIALOG_HEIGHT_RATIO = 0.8; constexpr double DIALOG_HEIGHT_RATIO_FOR_LANDSCAPE = 0.9; constexpr double DIALOG_HEIGHT_RATIO_FOR_CAR = 0.95; constexpr Dimension listPaddingHeight = 48.0_vp; -constexpr int32_t PLATFORM_VERSION_TEN = 10; } // namespace @@ -372,8 +371,8 @@ bool DialogLayoutAlgorithm::SetAlignmentSwitch( } return true; } - bool version10OrLarger = PipelineBase::GetCurrentContext()->GetMinPlatformVersion() >= PLATFORM_VERSION_TEN; - if (version10OrLarger && SystemProperties::GetDeviceType() == DeviceType::PHONE) { + + if (SystemProperties::GetDeviceType() == DeviceType::PHONE) { if (SystemProperties::GetDeviceOrientation() == DeviceOrientation::LANDSCAPE) { topLeftPoint = OffsetF(maxSize.Width() - childSize.Width(), maxSize.Height() - childSize.Height()) / 2.0; return true; -- Gitee