You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/background/topics/layout.rst
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
.. _layout:
2
2
3
-
===========================
3
+
=============
4
4
Widget layout
5
-
===========================
5
+
=============
6
6
7
7
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).
8
8
@@ -26,20 +26,26 @@ When a refresh is requested on a container, any sub-containers will also be refr
26
26
Length units
27
27
============
28
28
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:
31
32
32
33
* A CSS pixel is about 1/96 of an inch (0.26 mm) on a desktop screen, and about 1/160 of
33
34
an inch (0.16 mm) on a phone screen.
34
35
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.
37
37
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
0 commit comments