/** * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export class StyleConstants { static readonly DEFAULT_FONT_COLOR = '#ffffff'; static readonly DEFAULT_BG_COLOR = '#00000000'; static readonly DEFAULT_SYSTEM_UI_COLOR = '#00ffffff'; static readonly FOLDER_ADD_APP_FONT_COLOR = '#000000'; static readonly TEXT_COLOR_PRIMARY = '#E6000000'; static readonly BUTTON_FONT_COLOR = '#007DFF'; static readonly DEFAULT_BUTTON_FONT_SIZE = '16fp'; static readonly DEFAULT_DIALOG_BOTTOM_MARGIN = '16vp'; static readonly DEFAULT_DIALOG_RADIUS = '24vp'; static readonly DEFAULT_DIALOG_WIDTH = '395vp'; static readonly DEFAULT_BUTTON_HEIGHT = '40vp'; static readonly DEFAULT_DIVIDER_HEIGHT = '24vp'; static readonly DEFAULT_BUTTON_WIDTH = '120vp'; static readonly DEFAULT_COLOR_ERROR = '#FFE84026'; static readonly DEFAULT_ICON = '/common/pics/icon.png'; static readonly DEFAULT_BACKGROUND_IMAGE = '/common/pics/img_wallpaper.jpg'; static readonly DEFAULT_APP_GRID_COLUMN = 7; static readonly DEFAULT_APP_GRID_ROW = 4; static readonly DEFAULT_APP_GRID_COLUMN_GAP = 50; static readonly DEFAULT_APP_GRID_ROW_GAP = 24; static readonly DEFAULT_APP_ICON_SIZE_WIDTH = 70; static readonly DEFAULT_APP_NAME_SIZE= 12; static readonly DEFAULT_APP_NAME_HEIGHT = 25; static readonly DEFAULT_APP_ITEM_WIDTH = 72; static readonly DEFAULT_APP_ITEM_HEIGHT = 64; static readonly DEFAULT_APP_MARGIN = 10; static readonly DEFAULT_FOLDER_GRID_SIZE= 136; static readonly DEFAULT_FOLDER_APP_SIZE= 44; static readonly DEFAULT_FOLDER_GRID_MARGIN= 10; static readonly DEFAULT_FOLDER_GRID_GAP= 2; static readonly DEFAULT_OPEN_FOLDER_GRID_ROW= 4; static readonly DEFAULT_OPEN_FOLDER_GRID_COLUMN= 4; static readonly DEFAULT_OPEN_FOLDER_APP_SIZE= 60; static readonly DEFAULT_ADD_APP_SIZE= 54; static readonly DEFAULT_OPEN_FOLDER_APP_NAME_SIZE= 14; static readonly DEFAULT_OPEN_FOLDER_APP_NAME_HEIGHT= 36; static readonly DEFAULT_OPEN_FOLDER_GRID_WIDTH= 444; static readonly DEFAULT_OPEN_FOLDER_GRID_HEIGHT= 455; static readonly DEFAULT_OPEN_FOLDER_SWIPER_HEIGHT= 480; static readonly DEFAULT_OPEN_FOLDER_GRID_GAP= 6; static readonly DEFAULT_OPEN_FOLDER_TITLE_HEIGHT = 130; static readonly DEFAULT_OPEN_FOLDER_TITLE_TOP = 130; static readonly DEFAULT_APP_ADD_TITLE_SIZE = 56; static readonly DEFAULT_DIALOG_BOTTOM_MARGIN_NUMBER = 16; static readonly DEFAULT_BUTTON_HEIGHT_NUMBER = 40; static readonly DEFAULT_MENU_HEIGHT = 76; static readonly PERCENTAGE_100 = '100%'; static readonly PERCENTAGE_85 = '85%'; static readonly PERCENTAGE_80 = '80%'; static readonly PERCENTAGE_80_number = 0.8; static readonly PERCENTAGE_75 = '75%'; static readonly PERCENTAGE_70 = '70%'; static readonly PERCENTAGE_15 = '15%'; static readonly DEFAULT_APP_IMAGE = '/common/pics/img_app_default.png'; static readonly DEFAULT_DELETE_IMAGE = '/common/pics/ic_public_delete.svg'; static readonly DEFAULT_BACKGROUND_IMAGE_RECENT = '/common/pics/ic_wallpaper_recent.jpg'; static readonly DEFAULT_RENAME_IMAGE = '/common/pics/ic_rename.svg'; static readonly APP_IMAGE_WIDTH = 240; static readonly APP_IMAGE_HEIGHT = 430; static readonly DEFAULT_NUMBER = 20; static readonly DEFAULT_APP_LIST_ITEM_WIDTH = 90; static readonly DEFAULT_APP_LIST_ITEM_HEIGHT = 90; static readonly DEFAULT_ITEM_RADIUS = 8; static readonly DEFAULT_BUTTON_TEXT_SIZE= 23; static readonly PIXEL_50 = 50; static readonly PIXEL_200 = 200; static readonly PIXEL_150 = 150; static readonly LIGHT_BLACK = '#3c000000'; static readonly DEFAULT_0 = 0; static readonly DEFAULT_1 = 1; static readonly DEFAULT_4 = 4; static readonly DEFAULT_5 = 5; static readonly DEFAULT_8 = 8; static readonly DEFAULT_10 = 10; static readonly DEFAULT_12 = 12; static readonly DEFAULT_14 = 14; static readonly DEFAULT_15 = 15; static readonly DEFAULT_16 = 16; static readonly DEFAULT_20 = 20; static readonly DEFAULT_24 = 24; static readonly DEFAULT_25 = 25; static readonly DEFAULT_28 = 28; static readonly DEFAULT_30 = 30; static readonly DEFAULT_40 = 40; static readonly DEFAULT_56 = 56; static readonly DEFAULT_60 = 60; static readonly DEFAULT_80 = 80; static readonly WINDOW_SHOW_DELAY: number = 150; static readonly DEFAULT_DIVIDER_COLOR = 'rgb(207, 195, 195)'; static readonly DEFAULT_FOLDER_APP_ITEM_WIDTH = 36; static readonly DEFAULT_FOLDER_APP_ITEM_WIDTH_SMALL = 45; static readonly DEFAULT_BADGE_FONT_SIZE = 16; static readonly DEFAULT_BADGE_SIZE = 20; static readonly MAX_BADGE_COUNT = 99; static readonly DEFAULT_BROAD_COLOR = 'rgba(0,0,0,0.15)'; static readonly DEFAULT_TRANSPARENT_COLOR = 'rgba(0,0,0,0)'; static readonly CONTEXT_MENU_WIDTH = 243; static readonly DEFAULT_FORM_ITEM_WIDTH = 78; static readonly DEFAULT_FORM_ITEM_HEIGHT = 78; static readonly DEFAULT_FORM_FONT_TITLE_SIZE= 16; static readonly DEFAULT_FORM_FONT_CONTENT_SIZE= 20; static readonly DEFAULT_FORM_FONT_TITLE_WEIGHT= 500; static readonly DEFAULT_FORM_FONT_CONTENT_WEIGHT= 400; static readonly DEFAULT_FORM_REMOVE_DIALOG_WIDTH= 336; static readonly DEFAULT_FORM_REMOVE_DIALOG_HEIGHT= 170; static readonly DEFAULT_FORM_REMOVE_DIALOG_BUTTON_WIDTH= 136; static readonly DEFAULT_FORM_REMOVE_DIALOG_BUTTON_HEIGHT= 22; static readonly DEFAULT_SMART_DOCK_MISSION_HEIGHT = 132; static readonly DEFAULT_SMART_DOCK_MISSION_MERGIN_BOTTOM = 6; static readonly DEFAULT_SMART_DOCK_MISSION_MERGIN_RIGHT = 2; static readonly DEFAULT_SMART_DOCK_MISSION_IMAGE_HEIGHT = 80; //image resources static readonly DEFAULT_FORM_MGR_BACKGROUND_IMAGE = '/common/pics/ic_wallpaper_form_manager.jpg'; static readonly DEFAULT_FORM_MGR_BACK_IMAGE = '/common/pics/ic_form_mgr_back.png'; static readonly DEFAULT_ARROW_RIGHT_IMAGE = '/common/pics/ic_arrow_right.svg'; // style static readonly DEFAULT_FORM_MARGIN = 10; static readonly FORM_MANAGER_VIEW_CARD_WIDTH = 300; static readonly FORM_MANAGER_VIEW_CARD_HEIGHT = 300; static readonly FORM_MANAGER_VIEW_WIDTH = 402; static readonly FORM_MANAGER_VIEW_HEIGHT = 528; static readonly FORM_MANAGER_VIEW_FORM_NAME_HEIGHT = 28; static readonly FORM_MANAGER_VIEW_FORM_SUB_NAME_HEIGHT = 22; // font resources static readonly DEFAULT_FORM_MGR_TEXT_FONT_SIZE = 20; static readonly DEFAULT_FORM_MGR_FONT_COLOR = '#e5ffffff'; static readonly DEFAULT_FORM_DIALOG_BUTTON_COLOR = '#007dff'; // layout percentage adaptation resources static readonly DEFAULT_LAYOUT_PERCENTAGE = '100%'; static readonly FORM_MGR_BOTTOM_WIDTH_PERCENTAGE = '80%'; static readonly FORM_MGR_BOTTOM_HEIGHT_PERCENTAGE = '10%'; static readonly FORM_MGR_SWIPER_WIDTH_PERCENTAGE = '80%'; static readonly FORM_MGR_SWIPER_HEIGHT_PERCENTAGE = '50%'; static readonly FORM_MGR_TEXT_HEIGHT_PERCENTAGE = '20%'; static readonly FORM_MGR_TOP_HEIGHT_PERCENTAGE = '10%'; // parameters for form manager page in phone static readonly FORM_MGR_STATUS_BAR_HEIGHT = 24; static readonly FORM_MGR_APP_BAR_HEIGHT = 56; static readonly FORM_MGR_BACK_ICON_HEIGHT = 18; static readonly FORM_MGR_BACK_ICON_WIDTH = 20; static readonly FORM_MGR_BACK_ICON_LEFT_MARGIN = 26; static readonly FORM_MGR_ADD_TO_DESKTOP_BUTTON_HEIGHT = 40; static readonly FORM_MGR_ADD_TO_DESKTOP_BUTTON_WIDTH = 305; static readonly FORM_MGR_ADD_TO_DESKTOP_BUTTON_LEFT_MARGIN = 27; static readonly FORM_MGR_ADD_TO_DESKTOP_BUTTON_RIGHT_MARGIN = 27; static readonly FORM_MGR_ADD_TO_DESKTOP_BUTTON_BOTTOM_MARGIN = 48; static readonly FORM_MGR_FORM_SIZE = 270; static readonly FORM_MGR_ADD_TO_DESKTOP_TEXT_SIZE = 18; static readonly FORM_MGR_APP_LABEL_TEXT_SIZE = 20; static readonly FORM_MGR_DESCRIPTION_TEXT_SIZE = 16; // the dpi of phone should be 480, but it is 320 currently. // so all dimensions have to be multiplied by 1.5 static readonly DPI_RATIO = 1; }