Browse Source

UI: Widget button style fixes.

pull/10132/head
Igor Kulikov 3 years ago
parent
commit
599911546b
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-custom-style-panel.component.ts
  2. 3
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-custom-style.component.ts
  3. 2
      ui-ngx/src/app/shared/components/button/widget-button.component.scss

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-custom-style-panel.component.ts

@ -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();
}

3
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/button/widget-button-custom-style.component.ts

@ -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;
}

2
ui-ngx/src/app/shared/components/button/widget-button.component.scss

@ -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) {

Loading…
Cancel
Save