diff --git a/libs/ui/src/lib/dialog-header/dialog-header.component.scss b/libs/ui/src/lib/dialog-header/dialog-header.component.scss
index 5d4e87f30f..43aa12cf35 100644
--- a/libs/ui/src/lib/dialog-header/dialog-header.component.scss
+++ b/libs/ui/src/lib/dialog-header/dialog-header.component.scss
@@ -1,3 +1,18 @@
:host {
display: block;
+
+ button[mat-icon-button] {
+ // Move the button to the corner with the same distance to the top and to the right
+ margin-right: -0.8125rem;
+ // Center the button on the title
+ margin-top: 0.125rem;
+ }
+
+ .with-close-button {
+ .text-center {
+ // Compensate for the width of the button (1.75rem minus the negative
+ // margin) to center the title in the dialog
+ padding-left: 0.9375rem;
+ }
+ }
}
diff --git a/libs/ui/src/lib/dialog-header/dialog-header.component.ts b/libs/ui/src/lib/dialog-header/dialog-header.component.ts
index f16d66c4b5..a626e1b6f7 100644
--- a/libs/ui/src/lib/dialog-header/dialog-header.component.ts
+++ b/libs/ui/src/lib/dialog-header/dialog-header.component.ts
@@ -8,7 +8,7 @@ import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
-import { close } from 'ionicons/icons';
+import { closeOutline } from 'ionicons/icons';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -26,7 +26,7 @@ export class GfDialogHeaderComponent {
public readonly closeButtonClicked = output();
public constructor() {
- addIcons({ close });
+ addIcons({ closeOutline });
}
protected onClickCloseButton() {