9 Commits

Author SHA1 Message Date
Scott Talbert
173d079681 Fix a bunch of Python 3.10 issues with pure-Python classes and demos
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision.  This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets.  There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.

Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.

This is an example of the relevant exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
    r.width = w
TypeError: 'float' object cannot be interpreted as an integer

Fixes #2038.

[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Robin Dunn
b3de786afd fix deprecation warning 2017-08-11 16:25:29 -07:00
Metallicow
c273dfa9b1 Trim Trailing Whitespace demos 2016-11-24 19:26:05 -06:00
Robin Dunn
dcd01ff9e6 Merge pull request #28 from driscollis/patch-4
Update GridLabelRenderer.py
2016-02-27 17:00:40 -08:00
Mike Driscoll
beb452b3cf Update GridLabelRenderer.py 2015-08-07 08:37:45 -05:00
wernerfb
4d28f39e69 DrawRectangleRect is replaced with DrawRectangle 2015-07-06 14:22:44 +02:00
Robin Dunn
a9595b241a PR64: Various Phoenix and Py3 fixes for the demo and library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 04:48:21 +00:00
Robin Dunn
558fcfa5a3 PR61: Added python shebangs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:44:14 +00:00
Robin Dunn
f96e25db1f Copy the wxPython demo from Classic
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 18:24:09 +00:00