From 4749c3cb987ab568265b857d785a85e6270e0efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= Date: Tue, 13 Aug 2024 11:25:02 +0200 Subject: [PATCH] slideshow: add more resolution adjustment options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we topped out at 1920x1080 resolution, which can become a problem for screens bigger than FHD, which are capable to show a much higher resolution of the slides but are artificially limited to a smaller resolution. This change adds 2560x1440 and 3840x2160 resolution. Ideally it would be to support resolution whatever the screen supports, but as there are issues with that (sliedshow does not show transitions correctly the second time) we add more options as a stop gap solution. Signed-off-by: Tomaž Vajngerl Change-Id: I9b132ad5ac897f956768c5d5a1e77fa18cb34246 --- browser/src/slideshow/LayersCompositor.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/browser/src/slideshow/LayersCompositor.ts b/browser/src/slideshow/LayersCompositor.ts index 8d7e79cf6560..faf5d66b1a0d 100644 --- a/browser/src/slideshow/LayersCompositor.ts +++ b/browser/src/slideshow/LayersCompositor.ts @@ -189,11 +189,16 @@ class LayersCompositor extends SlideShow.SlideCompositor { public computeLayerResolution(width: number, height: number) { width *= 1.2; height *= 1.2; - let resolutionWidth = 960; let resolutionHeight = 540; - if (width > 1920 || height > 1080) { + if (width > 3840 || height > 2160) { + resolutionWidth = 3840; + resolutionHeight = 2160; + } else if (width > 2560 || height > 1440) { + resolutionWidth = 2560; + resolutionHeight = 1440; + } else if (width > 1920 || height > 1080) { resolutionWidth = 1920; resolutionHeight = 1080; } else if (width > 1280 || height > 720) {