Skip to content

Commit

Permalink
slideshow: add more resolution adjustment options
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I9b132ad5ac897f956768c5d5a1e77fa18cb34246
  • Loading branch information
quikee committed Aug 14, 2024
1 parent 54da1ad commit 42e9dac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions browser/src/slideshow/LayersCompositor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 42e9dac

Please sign in to comment.