Fix bottom OSD margins on multi monitors setup

When player enters high resolution display, margins are being recalculated,
but when it goes back dragged to some lower resolution screen they are not.
This is wrong, as they should be reset back to the initial value which is zero.

Fixes #102
This commit is contained in:
Rafostar
2021-07-19 12:42:54 +02:00
parent 1004000ba2
commit 4738673f7f

View File

@@ -257,10 +257,9 @@ class ClapperRevealerBottom extends CustomRevealer
{
const maxWidth = 1720;
if(layoutWidth <= maxWidth)
return;
const margin = (layoutWidth - maxWidth) / 2;
const margin = (layoutWidth > maxWidth)
? (layoutWidth - maxWidth) / 2
: 0;
this.margin_start = margin;
this.margin_end = margin;