Browse Source
Merge pull request #10459 from ArtemDzhereleiko/AD/hot-fix/battery-level/safari-firefox
Fixed battery level widget for safari and firefox
pull/10493/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.scss
-
ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts
|
|
|
@ -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%; |
|
|
|
|
|
|
|
@ -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; |
|
|
|
|