Skip to content

Commit 8d486b4

Browse files
committed
Minor tweaks to sizing descriptions
1 parent 1e0f349 commit 8d486b4

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

docs/background/topics/layout.rst

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _layout:
22

3-
===========================
3+
=============
44
Widget layout
5-
===========================
5+
=============
66

77
One of the major tasks of a GUI framework is to determine where each widget will be displayed within the application window. This determination must be made when a window is initially displayed, and every time the window changes size (or, on mobile devices, changes orientation).
88

@@ -26,20 +26,26 @@ When a refresh is requested on a container, any sub-containers will also be refr
2626
Length units
2727
============
2828

29-
Toga uses CSS units in its public API. For a full explanation, see `this article
30-
<https://hacks.mozilla.org/2013/09/css-length-explained/>`__, but in summary:
29+
Toga uses CSS units in its public API. All size calculations assume that the user has a
30+
96 DPI display; if the user has a higher density display, the sizes that are applied
31+
will be scaled accordingly. In practice, this means that:
3132

3233
* A CSS pixel is about 1/96 of an inch (0.26 mm) on a desktop screen, and about 1/160 of
3334
an inch (0.16 mm) on a phone screen.
3435

35-
* A CSS point is 1.33 CSS pixels. Toga only uses points to measure font sizes; all other
36-
lengths are expressed as pixels.
36+
* A CSS point is 1.33 CSS pixels.
3737

38-
Implementation notes:
38+
Toga only uses points to measure font sizes. All other lengths are expressed as pixels.
39+
40+
For a full explanation of size interpretations, see `this article
41+
<https://hacks.mozilla.org/2013/09/css-length-explained/>`__.
42+
43+
Implementation notes
44+
~~~~~~~~~~~~~~~~~~~~
3945

4046
* On macOS and iOS, one CSS pixel equals one `"point"
4147
<https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html>`__,
42-
which is 1, 2 or 3 linear physical pixels depending on the device.
48+
which is 1, 2 or 3 linear physical pixels, depending on the device.
4349

4450
* On Windows, one CSS pixel equals one physical pixel at `100% scale
4551
<https://support.microsoft.com/en-us/windows/view-display-settings-in-windows-37f0e05e-98a9-474c-317a-e85422daa8bb>`__,

0 commit comments

Comments
 (0)