28 Commits

Author SHA1 Message Date
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
Robin Dunn
d9725119d7 Merge pull request #2039 from swt2c/pygauge_py3.10
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
2021-12-13 20:54:44 -08:00
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
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
732ff6752b Revert "Spelling fixes in wx.lib"
This reverts commit c00b8950da.
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Metallicow
542a32c17d Optimize Colour Brush Pen
Use builtin Colours, Brushes, Pens where needed. They are faster.
2020-07-19 23:48:39 -05:00
Robin Dunn
c00b8950da Spelling fixes in wx.lib 2020-07-14 12:53:31 -07:00
Robin Dunn
2f34c2e0c9 Ensure the widget has the capture before releasing it 2020-06-16 20:13:46 -07:00
Mesalu
5c68798d0c Fix #957 (#960)
Round RGB values to integers for creating the `wx.Colour`
2018-08-13 22:03:29 -07:00
Robin Dunn
705aa63d75 Merge branch 'more-windowidref' into wxPy-4.0.x
(cherry picked from commit ada7b2fc51)
2018-06-25 19:12:00 -07:00
Robin Dunn
b1b0c9e297 wx.NewId() --> wx.ID_ANY or wx.Window.NewControlId() as appropriate 2018-06-19 10:31:56 -07:00
Robin Dunn
ea7fc830aa Use Py27 compatible super() 2018-03-27 19:28:18 -07:00
Andrew Murray
2cfe4ad989 Fixed typos 2017-02-26 14:15:49 +11:00
Metallicow
17aaf52d9f Trim trailing space wx directory 2016-12-05 16:40:54 -06:00
tom surace
36e1a94ac3 Added CaptureMouse to the colour slider; it now responds to mouse events properly. 2016-11-14 23:22:49 -07:00
tom surace
2d51ef79d8 Fixed colourchooser palette and colour_slider controls.
Palette box and slider box are now sized to fit their content, making the
whole area accessible. Colour slider is now clickable.
2016-11-14 15:28:47 -07:00
tom surace
5da4bc6c57 Removed a line of dead code and renamed "ReseetPoint" to "ClearPoint". 2016-11-07 09:50:33 -07:00
tom surace
0c9269c07e Editing the text boxes now edits the colour chooser colours. 2016-11-06 17:51:15 -07:00
tom surace
245f6975c6 Implemented most of PyColourChooser.
V slider now updates to reflect the current colour.
Colours can now be full white and fully saturated.
Clicking on the palette no longer resets the V slider
Current-location dot on the palette is now correct.
2016-11-06 17:17:17 -07:00
Metallicow
3d1789135d Trim Whitespace colourchooser directory 2016-10-12 22:34:12 -05:00
DietmarSchwertberger
21d7a8e96a use absolute imports 2016-07-05 20:30:33 +02:00
Robin Dunn
700f95c632 PR 50: Py3 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-14 03:09:16 +00:00
Robin Dunn
d50b5bc994 PR 31 from Metallicow. Py3 and Phoenix updates for colourchooser.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 21:39:33 +00:00
Robin Dunn
9f24505715 Merge of PR 11 with the whitespace-only changes omitted.
See https://github.com/RobinD42/Phoenix/pull/11

Mostly phoenix-port changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 01:15:34 +00:00
Robin Dunn
48a7ecdd85 Remove all BeginDrawing/EndDrawing calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 07:43:45 +00:00
Robin Dunn
247673201b Copy (branch) wx.lib, wx.py and wx.tools from Classic, and include subpackages branched from 3rdParty
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 01:36:07 +00:00
Robin Dunn
a30dfe91e2 I wasn't ready to add this yet.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-22 21:29:15 +00:00
Robin Dunn
c8c2e1d97b set svn:eol-style to native
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-22 21:02:42 +00:00