mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Limit bottom fullscreen controls panel width
Fullscreen bottom controls panel does not look good when progress bar is too long (especially on "ultrawide" displays), so limit its max width to 1720 application-pixels. This should make it still long enough for convenient chapter seeking.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user