Skip to content

Add more scaling-tests

Currently, there is only a scaling-test for the Librem 5 in vertical orientation at 2 different scales (which currently does not change the size). There should be many more tests for display-variations, because otherwise improving the scaling-behaviour of Squeekboard would be guesswork.

This MR adds many such tests; most of those are based on devices that i found on the wiki of PostmarketOS (search-page), well-supported linux-smartphones and linux-tablet-PCs that i read about, and a variation of display-types that i found while looking through an online-shop.

I also added some tests for some displays that i have, so that i can compare the behaviour of these tests better, and to verify the tests work as those should. The tests were accurate to the exact pixel-count when compared to screenshots made while using Squeekboard in Phosh on 4 displays (6" at 1440x720, 15.6" at 1920x1080, 27" at 3840x2160, and 48" at 3840x2160), when using the (rounded) display-size-values that can be obtained from wlr-randr or xrandr, in the tests.

A display-size-calculator was used to calculate the width and height from resolution and diagonal display-size, so there may be small differences from what the actual devices have listed as their size in the output from wlr-randr or xrandr. (I measured one of my displays, and the calculated values were actually more accurate than the rounded size mentioned in the output of wlr-randr/xrandr.)

Some of these tests check for non-optimal results; however, as their purpose is mostly to make it noticeable how changes to scaling-behaviour affect various display-types, that should be okay for now. When the scaling-behaviour will be improved, the tests should be updated with values that fit the displays/devices better; preferably after testing on actual devices, but when those values seem to be quite different from an ideal size, calculating what it would look like based on the values that are available would be good enough.

List of some devices for which tests were added
  • FairPhone 5

    • Resolution: 2720 x 1224
    • Aspect-ratio: 20:9
    • Screen-size: 6.46" (16.41 cm) [5.89" × 2.65" = 15.62in² (14.96cm × 6.73cm = 100.75cm²)]
  • FairPhone 4

    • Resolution: 2340 x 1080
    • Aspect-ratio: 2.17:1
    • Screen-size: 6.3" (16 cm) [5.72" × 2.64" = 15.1in² (14.53cm × 6.71cm = 97.43cm²)]
  • OnePlus 6

    • Resolution: 2280 x 1080
    • Aspect-ratio: 2.11:1
    • Screen-size: 6.28" (15,95 cm) [5.68" × 2.69" = 15.26in² (14.42cm × 6.83cm = 98.44cm²)]
  • OnePlus 6T

    • Resolution: 2340 x 1080
    • Aspect-ratio: 2.17:1
    • Screen-size: 6.4" (16,26 cm) [5.81" × 2.68" = 15.58in² (14.76cm × 6.81cm = 100.55cm²)]
  • OnePlus 8T

    • Resolution: 2400 x 1080
    • Aspect-ratio: 20:9
    • Screen-size: 6.67" (16,94 cm) [6.08" × 2.74" = 16.65in² (15.45cm × 6.95cm = 107.41cm²)]
  • Purism Librem 5

    • Resolution: 1440 x 720
    • Aspect-ratio: 2:1
    • Screen-size: 5.7" (14,48 cm) [5.1" × 2.55" = 13in² (12.95cm × 6.47cm = 83.84cm²)]
  • PINE64 PinePhone Pro

    • Resolution: 1440×720
    • Aspect-ratio: 2:1
    • Screen-size: 6" (15,24 cm) [5.37" × 2.68" = 14.4in² (13.63cm × 6.82cm = 92.9cm²)]
  • Sony Xperia XA2

    • Resolution: 1920 x 1080
    • Aspect-ratio: 16:9
    • Screen-size: 5.2” (13.21 cm) [4.53" × 2.55" = 11.55in² (11.51cm × 6.48cm = 74.54cm²)]
  • SHIFT6mq

    • Resolution: 2160 x 1080
    • Aspect-ratio: 2:1
    • Screen-size: 6" (15,24 cm) [5.37" × 2.68" = 14.4in² (13.63cm × 6.82cm = 92.9cm²)]
  • Samsung Galaxy Xcover 2

    • Resolution: 800 x 480
    • Aspect-ratio: 5:3
    • Screen-size: 4" (10,16 cm) [3.43" × 2.06" = 7.06in² (8.71cm × 5.23cm = 45.54cm²)]
  • Purism Librem 11

    • Resolution: 2560 x 1600
    • Aspect-ratio: 16:10
    • Screen-size: 11.5" (29,21 cm) [9.75" × 6.09" = 59.44in² (24.77cm × 15.48cm = 383.47cm²)]
  • FairPhone 2

    • Resolution: 1920 x 1080
    • Aspect-ratio: 16:9
    • Screen-size: 5" (12,7 cm) [4.36" × 2.45" = 10.68in² (11.07cm × 6.23cm = 68.92cm²)]
  • Samsung Galaxy Tab 3 8.0

    • Resolution: 1280 x 800
    • Aspect-ratio: 16:10
    • Screen-size: 8" (20,32 cm) [6.78" × 4.24" = 28.76in² (17.23cm × 10.77cm = 185.57cm²)]
  • Nintendo 3DS top screen

    • Resolution: 400 × 240 (WQVGA)
    • Aspect-ratio: 5:3
    • Screen-size: 3.53" (8,97 cm) [3.03" × 1.82" = 5.5in² (7.69cm × 4.61cm = 35.47cm²)]
  • Nintendo 3DS bottom screen

    • Resolution: 320 × 240 (QVGA)
    • Aspect-ratio: 4:3
    • Screen-size: 3" (7,62 cm) [2.4" × 1.8" = 4.32in² (6.1cm × 4.57cm = 27.87cm²)]
  • Sony Xperia XZ1 Compact

    • Resolution: 1280 x 720
    • Aspect-ratio: 16:9
    • Screen-size: 4.6" (11,68 cm) [4.01" × 2.26" = 9.04in² (10.18cm × 5.73cm = 58.33cm²)]
  • Large monitor

    • Resolution: 3840 x 2160
    • Aspect-ratio: 16:9
    • Screen-size: 27" (68,58 cm) [23.53" × 13.24" = 311.5in² (59.77cm × 33.62cm = 2009.68cm²)]
  • Huge Monitor

    • Resolution: 3840 x 2160
    • Aspect-ratio: 16:9
    • Screen-size: 48" (121,92 cm) [41.84" × 23.53" = 984.5in² (106.26cm × 59.77cm = 6351.59cm²)]
  • Notebook-PC 1080p

    • Resolution: 1920 x 1080
    • Aspect-ratio: 16:9
    • Screen-size: 15.6" (39,62 cm) [13.6" × 7.65" = 103.99in² (34.54cm × 19.43cm = 670.89cm²)]
  • Notebook-PC

    • Resolution: 1366 x 768
    • Aspect-ratio: 16:9
    • Screen-size: 15.6" (39,62 cm) [13.6" × 7.65" = 103.96in² (34.54cm × 19.42cm = 670.72cm²)]
  • Apple MacBook Air M1

    • Resolution: 2560 x 1600
    • Aspect-ratio: 16:10
    • Screen-size: 13.3" (33,78 cm) [11.28" × 7.05" = 79.5in² (28.65cm × 17.9cm = 512.91cm²)]
  • Very wide monitor

    • Resolution: 3440 x 1440
    • Aspect-ratio: 24:10
    • Screen-size: 34" (86,36 cm) [31.36" × 13.13" = 411.76in² (79.66cm × 33.35cm = 2656.48cm²)]
  • Ultrawide monitor

    • Resolution: 5120 x 1440
    • Aspect-ratio: 32:9
    • Screen-size: 49" (124,46 cm) [47.17" × 13.27" = 625.78in² (119.81cm × 33.7cm = 4037.29cm²)]

Split from !639 , so that the scaling-tests can be merged soon.

Edited by MoonlightWave-12

Merge request reports