From 2d39474d006c4cb78154a6d73e2e00bd6891d0f2 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Wed, 28 Jun 2023 16:21:57 +0200 Subject: [PATCH] [editor] Move badge style to ShowStateVariablesButtonComponent --- .../show-state-variables-button.component.ts | 17 +++++++++++++++-- .../ui-element-toolbox.component.css | 8 -------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/projects/editor/src/app/components/new-ui-element-panel/show-state-variables-button.component.ts b/projects/editor/src/app/components/new-ui-element-panel/show-state-variables-button.component.ts index 4d16c1687..bc50af5ec 100644 --- a/projects/editor/src/app/components/new-ui-element-panel/show-state-variables-button.component.ts +++ b/projects/editor/src/app/components/new-ui-element-panel/show-state-variables-button.component.ts @@ -9,11 +9,24 @@ import { UnitService } from 'editor/src/app/services/unit.service'; color="primary" matBadgeColor="accent" [matBadge]="stateVariablesCount" - [style.width.%]="100" (click)="showStateVariablesDialog()"> <mat-icon>integration_instructions</mat-icon> <span>{{'stateVariable' | translate}}</span> - </button>` + </button>`, + styles: [` + button { + text-align: left; + font-size: medium; + width: 100%; + display: inline-block; + } + :host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content { + right: 12px; + } + :host ::ng-deep .mat-badge-medium.mat-badge-above .mat-badge-content { + top: 8px; + } + `] }) export class ShowStateVariablesButtonComponent { diff --git a/projects/editor/src/app/components/new-ui-element-panel/ui-element-toolbox.component.css b/projects/editor/src/app/components/new-ui-element-panel/ui-element-toolbox.component.css index e1ec20b07..b1af761df 100644 --- a/projects/editor/src/app/components/new-ui-element-panel/ui-element-toolbox.component.css +++ b/projects/editor/src/app/components/new-ui-element-panel/ui-element-toolbox.component.css @@ -50,11 +50,3 @@ button { .button-group { border: 3px groove; } - -:host ::ng-deep .mat-badge-medium.mat-badge-overlap.mat-badge-after .mat-badge-content { - right: 6px; -} - -:host ::ng-deep .mat-badge-medium.mat-badge-above .mat-badge-content { - top: 6px; -} -- GitLab