-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: Add negative size warning #7286
Conversation
Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines. |
kivy/uix/widget.py
Outdated
|
||
.. warning:: | ||
Kivy allows the `width` property to be negative, but Kivy does not | ||
support negative sizes. It is recommended to always have a positive | ||
`width` property. If not, the programmer must account for the | ||
consequences of a negative `width`. For example, `right` will actually | ||
be left of `x` when `width` is negative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. warning:: | |
Kivy allows the `width` property to be negative, but Kivy does not | |
support negative sizes. It is recommended to always have a positive | |
`width` property. If not, the programmer must account for the | |
consequences of a negative `width`. For example, `right` will actually | |
be left of `x` when `width` is negative. | |
.. warning:: | |
A negative size is not supported. |
I think something very concise is better because we don't need say anything beyond it not being supported. And most people will not care much beyond that.
kivy/uix/widget.py
Outdated
|
||
.. warning:: | ||
Kivy allows the `height` property to be negative, but Kivy does not | ||
support negative sizes. It is recommended to always have a positive | ||
`height` property. If not, the programmer must account for the | ||
consequences of a negative `height`. For example, `top` will actually | ||
be below of `y` when `height` is negative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. warning:: | |
Kivy allows the `height` property to be negative, but Kivy does not | |
support negative sizes. It is recommended to always have a positive | |
`height` property. If not, the programmer must account for the | |
consequences of a negative `height`. For example, `top` will actually | |
be below of `y` when `height` is negative. | |
.. warning:: | |
A negative size is not supported. |
Congrats on merging your first pull request! 🎉🎉🎉 |
* add negative size warning, fixes kivy#7226 * simplify warnings Co-authored-by: Guyrandy Jean-Gilles <->
fixes #7226. I'm leaving the maintainer checklist below but I don't think most of it is relevant.
Maintainer merge checklist
Component: xxx
label.api-deprecation
orapi-break
label.release-highlight
label to be highlighted in release notes.versionadded
,versionchanged
as needed.