• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 CommonStyleManager from '../../../../../../../common/src/main/ets/default/CommonStyleManager';
17
18const TAG = 'brightness-StyleConfiguration';
19
20export class BrightnessComponentStyle {
21  marginLeft: Length = $r('app.float.brightness_margin_left');
22  marginRight: Length = $r('app.float.brightness_margin_right');
23  componentGap: Length = $r('app.float.brightness_component_gap');
24  brightnessIconColor: ResourceColor = $r('sys.color.ohos_id_color_secondary');
25  brightnessReduceWidth: Length = $r('app.float.brightness_reduce_width');
26  brightnessReduceHeight: Length = $r('app.float.brightness_reduce_height');
27  brightnessPlusWidth: Length = $r('app.float.brightness_plus_width');
28  brightnessPlusHeight: Length = $r('app.float.brightness_plus_height');
29  brightnessHeight: Length = $r('app.float.brightness_height');
30  sliderHeight: Length = $r('app.float.brightness_slider_height');
31  sliderBlockColor: ResourceColor = $r('app.color.brightness_slider_block_color');
32  sliderTrackColor: ResourceColor = $r('app.color.brightness_slider_track_color');
33  sliderSelectedColor: ResourceColor = $r('app.color.brightness_slider_selected_color');
34}
35
36export default class StyleConfiguration {
37  static getBrightnessComponentStyle(): BrightnessComponentStyle {
38    const key: string = TAG + '-BrightnessComponent';
39    return CommonStyleManager.getStyle(key, BrightnessComponentStyle);
40  }
41}