From 4be2a0da775c733db7156b29b0600cbca50ab920 Mon Sep 17 00:00:00 2001 From: lmxxff Date: Fri, 8 Aug 2025 17:30:03 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E6=AD=A3=E5=9C=A8=E5=B0=8F?= =?UTF-8?q?=E5=B1=8F=E5=B9=95=EF=BC=88=E6=89=8B=E8=A1=A8=EF=BC=89=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E4=B8=8A=EF=BC=8C=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=20=E5=92=8C=20=E5=A3=B0=E9=9F=B3=20=E8=8F=9C=E5=8D=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E9=83=BD=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E7=82=B9=E9=80=89=E5=88=B0?= =?UTF-8?q?=E4=B8=8B=E9=9D=A2=E7=9A=84=E6=A0=8F=E4=BD=8D=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20Signed-off-by:=20lmxxff=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/pages/system/homePage.ets | 55 +++++++++++-------- .../src/main/ets/pages/volumeControl.ets | 39 +++++++------ 2 files changed, 54 insertions(+), 40 deletions(-) diff --git a/product/phone/src/main/ets/pages/system/homePage.ets b/product/phone/src/main/ets/pages/system/homePage.ets index 3bff1e9e..9485c295 100644 --- a/product/phone/src/main/ets/pages/system/homePage.ets +++ b/product/phone/src/main/ets/pages/system/homePage.ets @@ -36,39 +36,46 @@ struct SystemSettings { build() { Column() { - GridContainer({ gutter: ConfigData.GRID_CONTAINER_GUTTER_24, margin: ConfigData.GRID_CONTAINER_MARGIN_24 }) { - Column() { - HeadComponent({ headName: $r('app.string.systemTab'), isActive: true }); - + Scroll() { + GridContainer({ gutter: ConfigData.GRID_CONTAINER_GUTTER_24, margin: ConfigData.GRID_CONTAINER_MARGIN_24 }) { Column() { - SoftwareUpdateComponent({ title: $r("app.string.softwareUpdates") }) - .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) + HeadComponent({ headName: $r('app.string.systemTab'), isActive: true }); + + Column() { + SoftwareUpdateComponent({ title: $r("app.string.softwareUpdates") }) + .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) - SubEntryComponent({ targetPage: "pages/restoreFactorySettings", title: $r("app.string.restoreFactoryTab") }) - .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) + SubEntryComponent({ targetPage: "pages/restoreFactorySettings", title: $r("app.string.restoreFactoryTab") }) + .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) - SubEntryComponent({ - targetPage: 'pages/system/languageSettings/homePage', - title: $r("app.string.setlanguage") - }) - .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) + SubEntryComponent({ + targetPage: 'pages/system/languageSettings/homePage', + title: $r("app.string.setlanguage") + }) + .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) - SubEntryComponent({ targetPage: "pages/dateAndTime", title: $r("app.string.dateAndTimeTab") }) - .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) - .visibility(this.disallowModifyDateTime === true ? Visibility.None : Visibility.Visible) + SubEntryComponent({ targetPage: "pages/dateAndTime", title: $r("app.string.dateAndTimeTab") }) + .margin({ bottom: $r('sys.float.ohos_id_card_margin_start') }) + .visibility(this.disallowModifyDateTime === true ? Visibility.None : Visibility.Visible) - SubEntryComponent({ targetPage: "pages/developerOptions", title: $r("app.string.developerOptionsTab") }) + SubEntryComponent({ targetPage: "pages/developerOptions", title: $r("app.string.developerOptionsTab") }) + } + .margin({ top: $r("app.float.distance_8") }) } - .margin({ top: $r("app.float.distance_8") }) + .useSizeType({ + sm: { span: 4, offset: 0 }, + md: { span: 6, offset: 1 }, + lg: { span: 8, offset: 2 } + }) } - .useSizeType({ - sm: { span: 4, offset: 0 }, - md: { span: 6, offset: 1 }, - lg: { span: 8, offset: 2 } - }) + .width(ConfigData.WH_100_100) } + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.Off) + .scrollBarWidth(0) .width(ConfigData.WH_100_100) - .height(ConfigData.WH_100_100) + .align(Alignment.TopStart) + .layoutWeight(ConfigData.LAYOUT_WEIGHT_1) } .backgroundColor($r("sys.color.ohos_id_color_sub_background")) .width(ConfigData.WH_100_100) diff --git a/product/phone/src/main/ets/pages/volumeControl.ets b/product/phone/src/main/ets/pages/volumeControl.ets index f5b18610..eb15a11e 100644 --- a/product/phone/src/main/ets/pages/volumeControl.ets +++ b/product/phone/src/main/ets/pages/volumeControl.ets @@ -33,29 +33,36 @@ export struct VolumeControl { build() { Column() { - GridContainer({ gutter: ConfigData.GRID_CONTAINER_GUTTER_24, margin: ConfigData.GRID_CONTAINER_MARGIN_24 }) { - Column() { - //head - HeadComponent({ headName: $r('app.string.volumeControlTab') }); + Scroll() { + GridContainer({ gutter: ConfigData.GRID_CONTAINER_GUTTER_24, margin: ConfigData.GRID_CONTAINER_MARGIN_24 }) { + Column() { + //head + HeadComponent({ headName: $r('app.string.volumeControlTab') }); - SubHeader({ titleContent: $r('app.string.soundMode') }); + SubHeader({ titleContent: $r('app.string.soundMode') }); - // sound mode - AudioRingerModeComponent(); + // sound mode + AudioRingerModeComponent(); - SubHeader({ titleContent: $r('app.string.volumeControl') }); + SubHeader({ titleContent: $r('app.string.volumeControl') }); - // volume control - VolumeControlComponent(); + // volume control + VolumeControlComponent(); + } + .useSizeType({ + sm: { span: 4, offset: 0 }, + md: { span: 6, offset: 1 }, + lg: { span: 8, offset: 2 } + }) } - .useSizeType({ - sm: { span: 4, offset: 0 }, - md: { span: 6, offset: 1 }, - lg: { span: 8, offset: 2 } - }) + .width(ConfigData.WH_100_100) } + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.Off) + .scrollBarWidth(0) .width(ConfigData.WH_100_100) - .height(ConfigData.WH_100_100) + .align(Alignment.TopStart) + .layoutWeight(ConfigData.LAYOUT_WEIGHT_1) } .backgroundColor($r("sys.color.ohos_id_color_sub_background")) .width(ConfigData.WH_100_100) -- Gitee