Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix button icon margin

Chocobozzzdb129781cabc
diff --git a/client/src/app/shared/shared-main/buttons/button.component.html b/client/src/app/shared/shared-main/buttons/button.component.html
index 11c8ffeddd..d1a4215e6e 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.html
+++ b/client/src/app/shared/shared-main/buttons/button.component.html
@@ -1,6 +1,6 @@
<span class="action-button" [ngClass]="getClasses()" [ngbTooltip]="title" tabindex="0">
- <my-global-icon *ngIf="icon && !loading" [iconName]="icon"></my-global-icon>
<my-small-loader [loading]="loading"></my-small-loader>
+ <my-global-icon *ngIf="icon && !loading" [iconName]="icon"></my-global-icon>
<span *ngIf="label" class="button-label">{{ label }}</span>
diff --git a/client/src/app/shared/shared-main/buttons/button.component.scss b/client/src/app/shared/shared-main/buttons/button.component.scss
index c782ac3ef2..c53b8f2e50 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.scss
+++ b/client/src/app/shared/shared-main/buttons/button.component.scss
@@ -34,6 +34,12 @@ span[class$=-button] {
@include button-with-icon(21px);
width: 100%; // useful for ellipsis, allow to define a max-width on host component
+
+ &.icon-only {
+ my-global-icon {
+ margin: 0;
+ }
+ }
}
.orange-button {
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index b97012d9a0..52936a4d47 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -20,6 +20,7 @@ export class ButtonComponent {
return {
[this.className]: true,
disabled: this.disabled,
+ 'icon-only': !this.label,
'responsive-label': this.responsiveLabel
}
}