UI: Widget button style fixes.

This commit is contained in:
Igor Kulikov 2024-02-05 15:23:30 +02:00
parent 8262be6e64
commit 599911546b
3 changed files with 4 additions and 3 deletions

View File

@ -164,7 +164,7 @@ export class WidgetButtonCustomStylePanelComponent extends PageComponent impleme
}
private updatePreviewAppearance() {
this.previewAppearance = {...this.appearance};
this.previewAppearance = deepClone(this.appearance);
this.previewAppearance.customStyle[this.state] = this.customStyleFormGroup.value;
this.cd.markForCheck();
}

View File

@ -37,6 +37,7 @@ import { MatIconButton } from '@angular/material/button';
import {
WidgetButtonCustomStylePanelComponent
} from '@home/components/widget/lib/settings/common/button/widget-button-custom-style-panel.component';
import { deepClone } from '@core/utils';
@Component({
selector: 'tb-widget-button-custom-style',
@ -147,7 +148,7 @@ export class WidgetButtonCustomStyleComponent implements OnInit, OnChanges, Cont
}
private updatePreviewAppearance() {
this.previewAppearance = {...this.appearance};
this.previewAppearance = deepClone(this.appearance);
if (this.modelValue) {
this.previewAppearance.customStyle[this.state] = this.modelValue;
}

View File

@ -44,7 +44,7 @@ $mainColorActivatedFilled: var(--tb-widget-button-main-color-activated-filled, #
$mainColorDisabled: var(--tb-widget-button-main-color-disabled, $defaultMainColorDisabled);
$backgroundColorDisabled: var(--tb-widget-button-background-color-disabled, $defaultBackgroundColorDisabled);
$boxShadowColorDisabled: var(--tb-widget-button-box-shadow-color-activated, $defaultBoxShadowColor);
$boxShadowColorDisabled: var(--tb-widget-button-box-shadow-color-disabled, $defaultBoxShadowColor);
@mixin _tb-widget-button-styles($main, $background, $boxShadow) {