From 372b857a2f43cac045894b3737520b3c4214263c Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Wed, 28 Jun 2023 15:47:20 +0200
Subject: [PATCH] [editor] Change style of add button in
 StateVariablesDialogComponent

- Swap the position of dialog buttons
---
 .../state-variables-dialog.component.html     | 21 ++++++++-----------
 .../state-variables-dialog.component.ts       | 14 ++++++++++++-
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.html b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.html
index 92a02da91..8caf540ab 100644
--- a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.html
+++ b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.html
@@ -1,13 +1,5 @@
 <h1 mat-dialog-title>{{'manageStateVariables' | translate}}</h1>
 <div mat-dialog-content class="fx-column-start-stretch fx-gap-20">
-  <div class="fx-row-end-stretch">
-    <button mat-icon-button
-            matSuffix
-            color="primary"
-            (click)="addStateVariable()">
-      <mat-icon>add</mat-icon>
-    </button>
-  </div>
   <div *ngFor="let stateVariable of stateVariables; let i = index"
        class="fx-row-start-stretch fx-gap-10">
     <aspect-state-variable-editor
@@ -20,14 +12,19 @@
       <mat-icon>delete</mat-icon>
     </button>
   </div>
-</div>
-<div mat-dialog-actions>
   <button mat-button
-          mat-dialog-close>
-    {{'cancel' | translate }}
+          class="add-button"
+          (click)="addStateVariable()">
+    <mat-icon class="add-icon">add</mat-icon>
   </button>
+</div>
+<div mat-dialog-actions>
   <button mat-button
           [mat-dialog-close]="stateVariables">
     {{'save' | translate }}
   </button>
+  <button mat-button
+          mat-dialog-close>
+    {{'cancel' | translate }}
+  </button>
 </div>
diff --git a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts
index 50e286c4f..7169d9d97 100644
--- a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts
+++ b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts
@@ -3,7 +3,19 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
 import { StateVariable } from 'common/models/state-variable';
 
 @Component({
-  templateUrl: './state-variables-dialog.component.html'
+  templateUrl: './state-variables-dialog.component.html',
+  styles: [`
+    .add-button {
+      width: 100%;
+      height: 25px;
+      background-color: #BABABA;
+    }
+    .add-icon {
+      font-size: 24px;
+      color: white;
+      margin-top: -5px;
+    }
+  `]
 })
 export class StateVariablesDialogComponent {
   stateVariables: StateVariable[];
-- 
GitLab