Skip to content
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

Merged
merged 2 commits into from
Dec 29, 2020
Merged

Conversation

xayhewalo
Copy link
Contributor

@xayhewalo xayhewalo commented Dec 24, 2020

fixes #7226. I'm leaving the maintainer checklist below but I don't think most of it is relevant.

Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

@welcome
Copy link

welcome bot commented Dec 24, 2020

Thanks for opening your first pull request here! 💖 Please check out our contributing guidelines.

Comment on lines 1056 to 1062

.. 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. 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.

Comment on lines 1075 to 1081

.. 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. 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.

@matham matham changed the title add negative size warning Doc: Add negative size warning Dec 27, 2020
@matham matham added the Component: documentation Documentation or examples label Dec 27, 2020
@matham matham added this to the 2.1.0 milestone Dec 27, 2020
@matham matham merged commit f130f02 into kivy:master Dec 29, 2020
@welcome
Copy link

welcome bot commented Dec 29, 2020

Congrats on merging your first pull request! 🎉🎉🎉

hamlet4401 pushed a commit to tytgatlieven/kivy that referenced this pull request Jul 3, 2021
* add negative size warning, fixes kivy#7226

* simplify warnings

Co-authored-by: Guyrandy Jean-Gilles <->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollideWidget does not work for widgets with negative size
2 participants