Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a23e3cb7 authored by Matthew DeVore's avatar Matthew DeVore
Browse files

Simplify pane sizing and scaling algorithm

Simplify the scaling parameters and algorithm and reduce vertical
padding.

Originally a maxBlockRatio was specified at .12, which would have
caused a block length to typically be 2560 * 0.12 = 307. However, this
fails to account for smaller displays and high-DPI displays which have
smaller dip dimensions. So instead choose a maximum edge length of
256dp, which I have found to give good results on a laptop device
and a high DPI tablet, and which does not assume typical sizing for
configured displays, and still accomplishes the purpose of limiting
scrolling and dragging size.

Using the aspect ratio of the display bounds in setting the height
frequently caused a very large amount of padding, and limiting based on
the max block height only reduced it slightly. Now we set the vertical
height based on the minEdgeLength. This length is considered the
smallest size that can be comfortably interacted with, and we use it to
give ballpark ideal padding size.

Note that the unit test cases have increased pane height but in
practice (real-world pane width and constraints) this change seems to
decrease the pane height in general.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/352650922
Test: atest DisplayTopologyPreferenceTest.kt
Test: atest TopologyScaleTest.kt
Test: compare appearance on mid-dpi and high-dpi screens with a single 1080p external display, or with two external displays of smallish logical size
Change-Id: Id189892c88a1e833c1f54b0e5447a15f92e3310f
parent 5161aff8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment