Jelajahi Sumber

修复状态栏与信息文本或功能按键存在遮挡

onecold 1 tahun lalu
induk
melakukan
7ce9ac6d9b

+ 0 - 3
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -13,8 +13,6 @@
  * limitations under the License.
  */
 
-import { resourceManager } from '@kit.LocalizationKit';
-import { VideoItem } from '../../viewmodel/VideoItem';
 import { VideoSpeed } from '../../viewmodel/VideoSpeed';
 
 /**
@@ -90,7 +88,6 @@ export class CommonConstants {
   static readonly SORT_ARRAY = ["按艺术家升序", "按艺术家降序", "按专辑升序", "按专辑降序", "按名称升序", "按名称降序", "按添加时间升序",
   "按添加时间降序"]
 
-  static readonly TOP_HEIGHT: number = 33;
 
   //德本的接口调用微信支付下单接口返回的支付交易会话ID,该值有效期为2小时。
   static readonly WX_PAY_API: string = "https://pay.ss5.xyz/wechat/prepay"

+ 2 - 2
entry/src/main/ets/pages/AboutPage.ets

@@ -19,7 +19,7 @@ export struct AboutPage{
 
   onColorModeChange() {
     this.isDarkMode = this.currentMode === ConfigurationConstant.ColorMode.COLOR_MODE_DARK
-    this.titleBarModel.setTitleFontColor($r('app.color.title_text'))
+    this.titleBarModel
       .setTitleBarBackground($r('app.color.title_bar_bg'))
       .setLeftTitleBackground($r('app.color.title_bar_bg'))
   }
@@ -60,7 +60,7 @@ export struct AboutPage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
 

+ 2 - 2
entry/src/main/ets/pages/ScanFilePage.ets

@@ -1,6 +1,6 @@
 import TitleBar from '../view/TitleBar'
 import {  router } from '@kit.ArkUI'
-import { FileUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils'
+import { AppUtil, FileUtil, LogUtil, PreferencesUtil, ToastUtil } from '@pura/harmony-utils'
 import lottie from '@ohos/lottie'
 import { AnimationItem } from '@ohos/lottie'
 import { MessageEvents, taskpool, worker } from '@kit.ArkTS'
@@ -131,7 +131,7 @@ export struct ScanFilePage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })

+ 1 - 1
entry/src/main/ets/pages/SettingPage.ets

@@ -190,7 +190,7 @@ export struct SettingPage {
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })

+ 3 - 3
entry/src/main/ets/pages/VipPage.ets

@@ -55,10 +55,10 @@ export  struct  VipPage{
   static readonly IS_AGREE: string = 'isAgree';
   static readonly FOEVEER_DATE: string = 'forever';
   @State params: object = router.getParams()
-  @State payPrice:number = 38.8 //9是一个  19是一年  19是永久赞助
+  @State payPrice:number = 39.88 //9是一个  19是一年  19是永久赞助
   static readonly TYPE_MONTH: number = 9.8;
   static readonly TYPE_YEAR: number = 19
-  static readonly TYPE_FOREVER: number = 38.8
+  static readonly TYPE_FOREVER: number = 39.88
 
 
 
@@ -122,7 +122,7 @@ export  struct  VipPage{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({ model: $titleBarModel })

+ 2 - 2
entry/src/main/ets/pages/WebIndex.ets

@@ -1,7 +1,7 @@
 import TitleBar from '../view/TitleBar'
 import { router } from '@kit.ArkUI'
 import { webview } from '@kit.ArkWeb';
-import { NetworkUtil, ToastUtil } from '@pura/harmony-utils';
+import { AppUtil, NetworkUtil, ToastUtil } from '@pura/harmony-utils';
 import { ConfigurationConstant } from '@kit.AbilityKit';
 import { Utility } from '../common/util/Utility';
 import { BreakpointTypeEnum } from '../common/util/BreakpointSystem';
@@ -67,7 +67,7 @@ struct  WebIndex{
       Column(){
         Line().width('100%').height('100%')
       }
-      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+      .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
       .backgroundColor($r('app.color.title_bar_bg'))
       .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
       TitleBar({model:$titleBarModel})

+ 1 - 1
entry/src/main/ets/view/LocalMusic.ets

@@ -1697,7 +1697,7 @@ export struct LocalMusic {
         Column(){
           Line().width('100%').height('100%')
         }
-        .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:CommonConstants.TOP_HEIGHT)
+        .height(this.currentBreakpoint !== BreakpointTypeEnum.SM?0:px2vp(AppUtil.getStatusBarHeight()))
         .backgroundColor(this.isCustomizeBg?Color.Transparent:$r('app.color.title_bar_bg'))
         .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
         TitleBar({ model: $titleBarModel })