1/** 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { CommonConstants } from '@ohos/common'; 17import { SmartDockStyleConfig } from '@ohos/smartdock'; 18 19/** 20 * Dock style configuration class 21 */ 22export default class PhoneSmartDockStyleConfig extends SmartDockStyleConfig { 23 24 /** 25 * dock list height 26 */ 27 mDockHeight = 78; 28 29 /** 30 * dock list backgroundcolor 31 */ 32 mBackgroundColor = '#85FAFAFA'; 33 34 /** 35 * dock list radius 36 */ 37 mDockRadius = 22; 38 39 /** 40 * dock list back drop blur 41 */ 42 mBackdropBlur = 0; 43 44 /** 45 * dock list padding 46 */ 47 mDockPadding = 12; 48 49 /** 50 * dock list margin 51 */ 52 mDockMargin = 10; 53 54 /** 55 * list item width 56 */ 57 mListItemWidth = 54; 58 59 /** 60 * list item height 61 */ 62 mListItemHeight = 54; 63 64 /** 65 * list item gap 66 */ 67 mListItemGap = 33; 68 69 /** 70 * list icon size 71 */ 72 mIconSize = 54; 73 74 /** 75 * max display item count in dock list 76 */ 77 mMaxDockNum = 4; 78 79 protected constructor() { 80 super(); 81 } 82 83 static getInstance(): PhoneSmartDockStyleConfig { 84 if (globalThis.PhoneSmartDockStyleConfig == null) { 85 globalThis.PhoneSmartDockStyleConfig = new PhoneSmartDockStyleConfig(); 86 globalThis.PhoneSmartDockStyleConfig.initConfig(); 87 } 88 return globalThis.PhoneSmartDockStyleConfig; 89 } 90 91 getConfigLevel(): string { 92 return CommonConstants.LAYOUT_CONFIG_LEVEL_PRODUCT; 93 } 94} 95