@@ -961,8 +961,21 @@ def set_center_y(self, value):
961
961
Only the :class:`~kivy.uix.layout.Layout` and
962
962
:class:`~kivy.core.window.Window` classes make use of the hint.
963
963
964
- The value is in percent as a float from 0. to 1., where 1. means the full
965
- size of his parent. 0.5 represents 50%.
964
+ The size_hint is used by layouts for two purposes:
965
+
966
+ - When the layout considers widgets on their own rather than in
967
+ relation to its other children, the size_hint_x is a direct proportion
968
+ of the parent width, normally between 0.0 and 1.0. For instance, a
969
+ widget with ``size_hint_x=0.5`` in
970
+ a vertical BoxLayout will take up half the BoxLayout's width, or
971
+ a widget in a FloatLayout with ``size_hint_x=0.2`` will take up 20%
972
+ of the FloatLayout width. If the size_hint is greater than 1, the
973
+ widget will be wider than the parent.
974
+ - When multiple widgets can share a row of a layout, such as in a
975
+ horizontal BoxLayout, their widths will be their size_hint_x as a
976
+ fraction of the sum of widget size_hints. For instance, if the
977
+ size_hint_xs are (0.5, 1.0, 0.5), the first widget will have a
978
+ width of 25% of the parent width.
966
979
967
980
:attr:`size_hint_x` is a :class:`~kivy.properties.NumericProperty` and
968
981
defaults to 1.
@@ -974,7 +987,8 @@ def set_center_y(self, value):
974
987
:attr:`size_hint_y` is a :class:`~kivy.properties.NumericProperty` and
975
988
defaults to 1.
976
989
977
- See :attr:`size_hint_x` for more information.
990
+ See :attr:`size_hint_x` for more information, but with widths and heights
991
+ swapped.
978
992
'''
979
993
980
994
size_hint = ReferenceListProperty (size_hint_x , size_hint_y )
0 commit comments