diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.scss index a85d7d694b..4bef541ad2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.scss @@ -65,6 +65,8 @@ .tb-battery-level-box { display: flex; align-items: center; + min-height: 0; + max-height: 100%; .tb-battery-level-rectangle { width: 100%; height: 100%; diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts index 5251a0c602..0cc6d266b0 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts @@ -307,7 +307,7 @@ export class BatteryLevelWidgetComponent implements OnInit, OnDestroy, AfterView const newWidth = height * horizontalBatteryDimensions.shapeAspectRatio; this.renderer.setStyle(this.batteryLevelRectangle.nativeElement, 'width', newWidth + 'px'); } else { - this.renderer.setStyle(this.batteryLevelRectangle.nativeElement, 'width', null); + this.renderer.setStyle(this.batteryLevelRectangle.nativeElement, 'width', width + 'px'); } if (this.batteryLevelValue) { const ratios = horizontalBatteryDimensions.heightRatio;