Browse Source

UI: Rename fromColorProcessingSettings to fromColorProcessorSettings

pull/10557/head
Vladyslav_Prykhodko 2 years ago
parent
commit
514a89d350
  1. 12
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts
  2. 4
      ui-ngx/src/app/shared/models/widget-settings.models.ts

12
ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts

@ -191,25 +191,25 @@ export class BatteryLevelWidgetComponent implements OnInit, OnDestroy, AfterView
this.showValue = this.settings.showValue;
this.autoScaleValueSize = this.showValue && this.settings.autoScaleValueSize;
this.valueStyle = textStyle(this.settings.valueFont);
this.valueColor = ColorProcessor.fromColorProcessingSettings({
this.valueColor = ColorProcessor.fromColorProcessorSettings({
settings: this.settings.valueColor,
ctx: this.ctx,
minGradientValue: 0,
maxGradientValue: 0
maxGradientValue: 100
});
this.batteryLevelColor = ColorProcessor.fromColorProcessingSettings({
this.batteryLevelColor = ColorProcessor.fromColorProcessorSettings({
settings: this.settings.batteryLevelColor,
ctx: this.ctx,
minGradientValue: 0,
maxGradientValue: 0
maxGradientValue: 100
});
this.batteryShapeColor = ColorProcessor.fromColorProcessingSettings({
this.batteryShapeColor = ColorProcessor.fromColorProcessorSettings({
settings: this.settings.batteryShapeColor,
ctx: this.ctx,
minGradientValue: 0,
maxGradientValue: 0
maxGradientValue: 100
});
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);

4
ui-ngx/src/app/shared/models/widget-settings.models.ts

@ -361,13 +361,13 @@ export interface ColorProcessorSettings {
export abstract class ColorProcessor {
static fromSettings(color: ColorSettings, ctx?: WidgetContext): ColorProcessor {
return ColorProcessor.fromColorProcessingSettings({
return ColorProcessor.fromColorProcessorSettings({
settings: color,
ctx
});
}
static fromColorProcessingSettings(setting: ColorProcessorSettings): ColorProcessor {
static fromColorProcessorSettings(setting: ColorProcessorSettings): ColorProcessor {
const settings = setting.settings || constantColor(null);
switch (settings.type) {
case ColorType.constant:

Loading…
Cancel
Save