diff --git a/src/revealers.js b/src/revealers.js index bbdc7860..458219ba 100644 --- a/src/revealers.js +++ b/src/revealers.js @@ -228,6 +228,19 @@ class ClapperRevealerBottom extends CustomRevealer this.revealerBox.remove(widget); } + setLayoutMargins(layoutWidth) + { + const maxWidth = 1720; + + if(layoutWidth <= maxWidth) + return; + + const margin = (layoutWidth - maxWidth) / 2; + + this.margin_start = margin; + this.margin_end = margin; + } + _onMotion(controller, x, y) { const clapperWidget = this.root.child; diff --git a/src/widget.js b/src/widget.js index 2571857f..b1d53dfe 100644 --- a/src/widget.js +++ b/src/widget.js @@ -563,6 +563,10 @@ class ClapperWidget extends Gtk.Grid return; this.layoutWidth = width; + + if(this.isFullscreenMode) + this.revealerBottom.setLayoutMargins(width); + this.controls._onPlayerResize(width, height); }