深色模式下可以将状态栏的颜色修改一下在onWindowStageCreate方法中,判断是否是深色模式,如果是的话,则使用以下代码:windowStage.getMainWindow((e,w)=>{ let t=w.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM); AppStorage.setOrCreate<window.AvoidArea>(eHomeApp.AVOID_AREA,t); let systemBarProperties: window.SystemBarProperties = { isStatusBarLightIcon: true, statusBarContentColor: '#ffffff' } w.setWindowSystemBarProperties(systemBarProperties) })
深色模式下可以将状态栏的颜色修改一下
在onWindowStageCreate方法中,判断是否是深色模式,如果是的话,则使用以下代码: