Commit Graph

28 Commits

Author SHA1 Message Date
Robin Dunn
e53b09aea7 Revert "New button type: ShowHideToggleButton." 2021-12-15 18:10:12 -08:00
Robin Dunn
1432d933a5 Merge pull request #1980 from TEParsons/showHideToggleButton
New button type: ShowHideToggleButton.
2021-12-15 18:07:04 -08:00
Todd
f3a5e7cb98 Add docstring for show/hide toggle button 2021-12-14 15:33:30 +00: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
Todd
151683f603 New button type: ShowHideToggleButton.
Like a ToggleButton, but with an associated "menu", a Window or Sizer which is shown/hidden when button is toggled. Includes methods for setting active and inactive fore/background colours.
2021-04-01 16:56:54 +01: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
Robin Dunn
c00b8950da Spelling fixes in wx.lib 2020-07-14 12:53:31 -07:00
Per A. Brodtkorb
fc1823315b Fixes issue # 1554:
Replaced "== None" and "!= None" with "is None" and "is not None", respectively, because the former is slower and error-prone.
2020-03-23 11:53:36 +01:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
47c24c96e5 Make sure the default button face color is not one with a fully transparent alpha 2019-10-10 12:32:50 -07:00
JillHolliday
883d093cda Update buttons.py 2019-09-03 12:12:01 +01:00
Robin Dunn
b77c88a280 Merge tag 'wxPython-4.0.2' into wxPy-4.0.x
(cherry picked from commit 4c56c39e52)
2018-06-17 22:04:22 -07:00
Robin Dunn
86590a6b76 Fix typo 2018-03-08 14:07:42 -08:00
Robin Dunn
4a5a2a844c Set a default background colour for the generic buttons 2017-12-29 13:20:42 -08:00
Robin Dunn
c9e99b54b0 Update copyright in wx/lib 2017-02-13 17:06:07 -08:00
Metallicow
a8452dd575 Trim Whitespace lib directory 2016-10-12 22:21:38 -05:00
Robin Dunn
dd552ce670 Start updating some wx.lib docstrings 2016-06-09 21:46:05 -07:00
Robin Dunn
ea4b9b8fc5 updates for fullnames in the docstrings 2016-06-07 16:44:52 -07:00
Robin Dunn
26ceb9f067 We don't have DoEraseBackground yet... 2015-02-04 14:18:01 -08:00
Robin Dunn
bcbdcd9631 Remove more CVS $Id$ and $Revision$ tags, and a bit of code that uses them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-11 03:35:32 +00:00
Robin Dunn
295d3f6442 * Upgrade to the newest six module (1.2.0) and call it six instead of wx2to3.
* Tweak six a little, adding its license text since we'll only be distributing the module, fix the name of the dummy moves module, and add a PY33 constant since the change in memoryview affects our code.

* Update all modules already using the old wx2to3

* Tweak lots of unit tests and other modules to work with Python 3.3 (still a few more that will need some work.)

* Try to deal with memoryview changes in Py3.3, without much luck...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 01:15:41 +00:00
Andrea Gavana
2037469921 - Use vertical layout for Graphviz-generated class inheritance diagrams (to get the old behaviour back, change the rankdir arguments from "TB" to "LR" in the inheritance.py script;
- Do not generate module-level inheritance diagrams anymore;
- Correct a few ReST typos in `newevent.py`, `expando.py` and `buttons`;
- Include a toctree ReST reference to `classic_vs_phoenix.txt` in the `MigrationGuide.txt` document, to stop Sphinx complaining about it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-17 15:28:20 +00:00
Andrea Gavana
6bfa39aff0 Phoenix:
- Phoenix-port of `wx.lib.buttons.py`, with unittest and documentation updated to Phoenix standards;
- Phoenix-port of part of the AGW library, including `AdvancedSplash`, `BalloonTip`, `ButtonPanel`, `CubeColourDialog`, `CustomTreeCtrl`, `FloatSpin`, `FoldPanelBar`, `FourWaySplitter`, `GenericMessageDialog`, `HyperLinkCtrl` and `HyperTreeList`. Unittests and documentation updated to Phoenix standards;
- Added the `wx2to3.py` module to `wx.lib`, to facilitate the port to Python 3 (AGW depends on it).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-16 16:52:14 +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