Commit Graph

1163 Commits

Author SHA1 Message Date
Robin Dunn
c3d4881bfd Fix an invalid escape sequence warning 2021-01-20 13:10:33 -08:00
Kevin Schlosser
ec12b059d7 Fixes transparency in the docking guides for wx.lib.agw.aui
wx.Region no longer selects all non transparent pixels when a wxBitmap is passed to the constructor. In order to get the region made properly a color bust also be supplied. As luck would have it the way the docking guide images were made we are able to do this because there is only a single color that we needed to use.
2021-01-18 15:26:05 -08:00
Scott Talbert
eb0156fed3 Adjust CubeColourDialog's SpinCtrl width when on GTK3
Fixes #1891.
2021-01-18 15:25:33 -08:00
Kevin Schlosser
40e454d179 Fixes floating point math in wx.lib.agw.aui
wx.lib.agw.aui was never converted to run on Python 3 and as a result the division operator forces a conversion of the used values to a float. Floats cannot be used in functions like `range`. This caused quite number of things to not function properly and produce tracebacks.

The other thing is when wx.lib.agw.aui was written pixels could not be rendered using coordinates that were floats so now passing floats could cause rendering alignment problems because the layout of the various bits were done so in a manner that would have the alignment correct using integers.
2021-01-18 15:25:33 -08:00
cbeytas
7b02c88a28 Merge branch 'master' into treefixes 2021-01-10 03:04:29 +00:00
Robin Dunn
4ab028d7c3 Use a global wx.DataFormat 2021-01-07 14:52:34 -08:00
Robin Dunn
c8e25b79e1 Run SIP via its Python interface rather than as a separate subprocess 2021-01-05 11:01:25 -08:00
Robin Dunn
e198659b25 Merge pull request #1857 from jmoraleda/Issue1856
AuiToolBar checks that it has not been Destroyed by the most recent a…
2020-12-18 16:29:58 -08:00
Robin Dunn
aa2f657441 Merge pull request #1873 from jmoraleda/issue_1872
Ensure variable is created before referencing it in aui framemanager.
2020-12-18 16:24:21 -08:00
Jorge Moraleda
d0577746ed Ensure variable is created before referencing it in aui framemanager. 2020-12-12 12:39:26 -08:00
Eric Poulsen
5da1fd2d89 fix for negative number entry 2020-12-05 16:17:37 -08:00
Jorge Moraleda
e059ec1af9 AuiToolBar checks that it has not been Destroyed by the most recent action before doing any post-processing for the action 2020-11-25 19:54:11 -08:00
Robin Dunn
1a8d0fa9bb Check for existing mouse capture before doing a capture/release 2020-11-18 14:13:51 -08:00
Robin Dunn
e4bd88b0d9 Merge pull request #1848 from jmoraleda/issue_1361
Update AuiManager when a dummy center pane is added. This fixes #1361
2020-11-18 13:41:23 -08:00
Jorge Moraleda
cb711169ed Update AuiManager when a dummy center pane is added. This fixes #1361 2020-11-17 17:47:43 -08:00
Michael Eager
566dd8f35f Merge branch 'master' into refactor-thumbnailctrl 2020-11-16 15:32:52 -08:00
eager
0a03c37a26 Fixes from code review. 2020-10-28 09:57:09 -07:00
eager
81c0461233 Refactor ThumbnailCtrl, create stand-alone ScrolledThumbnail widget
ThumbnailCtrl is more of a image browser demo application than a widget,
in that it reads files from a directory, selects which files to display,
deletes files, displays the source directory path in a text ctrl, etc.
This makes it unlikely that it could be used in any other application,
for example, to provide thumbnails of files with different file types
than the ones hard-coded in the class.

ThumbnailCtrl delegates most of its operations to ScrolledThumbnail
which actually implements a scrolled window of thumbnails, a Thumb class,
which contains information about a thumbnail, and an ImageHandler class,
which manipulates images.  There was poor isolation of functionality
between these classes, violating object-oriented design, with one class
making changes to the internal data of another class.  Additionally, there
was substantial non-functional code, as well as code which did not
function correctly.

This refactoring maintains the functionality and interfaces of
ThumbnailCtrl, except for those which were unused.  Existing uses of
the thumbnailctrl package should work without modification.  A new package,
scrolledthumbnail, contains the functionality for a scrolled window
containing thumbnails, an extendable Thumb class, and image manipulation
classes.  The scrolledthumbnail package can be used in other applications,
independent of the ThumbnailCtrl class, and without the functional
restrictions of that application.

Detailed changes:

ThumbnailCtrl.py (demo program):
 - Always import from wx.lib.agw
 - Optional code to use PIL instead of native image handling
 - Add setting for thumbnail width and height
 - Increase size of demo window

thumbnailctrl.py:
 - Move Thumb, ScrolledThumbnail, ImageHandler to scrolledthumbnail.py
 - Remove EVT_THUMBNAILS_CAPTION_CHANGED (unused)
 - Add EVT_THUMBNAILS_CHAR to respond to keystrokes
 - Remove image processing code
 - Add scrolling dialog for delete files
 - Move directory processing from ScrolledThumbnail
 - Move file delete processing from ScrolledThumbnail
 - List all files to be deleted in scrolling dialog
 - Remove unused or unimplemented methods and options

scrolledthumbnail.py:
 - Move Thumb, ScrolledThumbnail, ImageHander classes from thumbnailctrl.py
 - Add documentation for ScrolledThumbnail widget
 - Add example program which does not use ThumbnailCtrl
 - New EVT_THUMBNAILS_CHAR event for key press
 - Remove unused options and dead code
 - Add Rotate() to PILImageHandler and NativeImageHandler
 - Throw event EVT_THUMBNAILS_CHAR for keystroke on thumbnail
 - Fix failure to rotate images correctly
 - Redisplay window when thumb size changed
 - Simplify logic
 - Remove popup dialog when rotating images
2020-10-28 09:56:35 -07:00
Metallicow
8d4f8e733c Reduce flicker in throbber. Use BufferedPaintDC 2020-10-27 19:03:10 -05:00
Robin Dunn
1842b2bc9a Merge branch 'master' into webview-edge 2020-10-14 13:02:12 -07:00
Robin Dunn
9bef374ecf Give a warning about CheckListCtrlMixin's redundancy 2020-10-13 15:56:04 -07:00
Robin Dunn
bf34a1e276 Fix indentation issue 2020-10-13 14:18:03 -07:00
Robin Dunn
88dd4e2f30 Use key-up on MSW and key-down on others. Only skip for keys not handled by the event handler. 2020-10-12 12:46:15 -07:00
Metallicow
a2f316edcf fix small typo in mixin sample example 2020-10-12 12:45:08 -07:00
Metallicow
94ccec7aca Update and fixes per Robins REQz
Robins requested changes found here #1695
Also added current and pressed bitmaps to mixin.
2020-10-12 12:45:08 -07:00
Metallicow
81843a627f Add wx.lib.checkbox
Sphinx Formatting and other stuff per Robins REQz
2020-10-12 12:45:08 -07:00
Metallicow
c81865ddbb revert disabled flag in unchecked checkbox func
I believe this one looks right now
2020-10-12 12:45:08 -07:00
Metallicow
037dcb96f4 Add PurePython Checkbox
Mostly ported from the wxPyWiki impl and also is a mixin to get bitmaps if desired if hacking on other widgets.
2020-10-12 12:45:08 -07:00
Robin Dunn
8a04577f95 Pin cython version to aid in consistency across platforms 2020-10-09 10:04:13 -07:00
Robin Dunn
9db9d72ed4 Merge pull request #1806 from StefanBruens/more_test_fixes
More test fixes
2020-10-08 21:00:32 -07:00
Robin Dunn
f413ead0b2 Merge pull request #1759 from Metallicow/AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR
Add agw.aui.AUI_DOCKART_HINT_WINDOW_BORDER_COLOUR theming
2020-10-08 20:59:36 -07:00
Stefan Brüns
62cda454f1 Do not specify invalid alignment in BoxSizer flags
Specyfing a horizontal alignment in a wxHORIZONTAL layed out BoxSizer
is pointless, and doing so throws an exception:

wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_RIGHT)"
failed at ./src/common/sizer.cpp(2133) in DoInsert():
Horizontal alignment flags are ignored in horizontal sizers
2020-10-02 17:56:43 +02:00
Robin Dunn
ed834e7640 Copy the new sip.h 2020-09-16 16:15:17 -07:00
Robin Dunn
05ae56ab2a Merge pull request #1792 from maddox32/master
avoid sizer assert agw/PyProgress
2020-09-10 13:36:45 -07:00
maddox32
cbe476df0b Remove superflous if 2020-09-10 19:35:54 +02:00
maddox32
1ee432bfab Avoid sizer flag assert 2020-09-10 19:35:05 +02:00
Gary Geng
5e98a91793 Remove deprecated style 'TB_3DBUTTONS' from ShortcutEditor 2020-09-07 10:47:21 -05:00
Robin Dunn
bfb335672e Merge pull request #1786 from wxWidgets/fix-issue1782
Ensure the watch list widget is updated after adding a new module
2020-08-31 16:31:35 -07:00
Robin Dunn
9b0f1e8aec Avoid assertions in DrawEllipticArc when height is zero 2020-08-31 14:47:46 -07:00
Robin Dunn
4b58bab661 Merge branch 'Fix-PieCtrl-and-Optimize' of https://github.com/Metallicow/Phoenix into Metallicow-Fix-PieCtrl-and-Optimize 2020-08-31 14:10:48 -07:00
Robin Dunn
ad616eea16 Merge pull request #1785 from ryannazaretian/master
Fix hypertreelist.py SetColumnWidth calls incorrect function for LIST_AUTOSIZE_CONTENT_OR_HEADER #1784
2020-08-31 13:48:24 -07:00
Metallicow
fa68af686d Fix per Robins REQz #1764
another way to do just 1
2020-08-31 15:42:40 -05:00
Robin Dunn
86734c2697 Ensure the watch list widget is updated after adding a new module 2020-08-31 13:38:15 -07:00
Robin Dunn
beb55bc88a Restore missing SetWindowVariant 2020-08-31 13:25:56 -07:00
Robin Dunn
fa620e6e43 Merge branch '1780-fix-eventwatcher-filter' of https://github.com/carandraug/Phoenix into carandraug-1780-fix-eventwatcher-filter 2020-08-31 13:21:43 -07:00
Robin Dunn
5cb3d97be7 Merge pull request #1779 from carandraug/1778-fix-eventwatcher-import
EventWatcher: fix __import__ usage by replacing it with importlib (cl…
2020-08-31 13:15:47 -07: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
Ryan Nazaretian
05fbbfb3b5 Fixed issue with SetColumnWidth() using LIST_AUTOSIZE_CONTENT_OR_HEADER
Without the change, SetColumnWidth(**col**, LIST_AUTOSIZE_CONTENT_OR_HEADER) would throw this:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/wx/lib/agw/hypertreelist.py", line 4645, in SetColumnWidth
    width2, dummy, dummy = dc.GetMultiLineTextExtent(self._header_win.GetColumnText(column))
ValueError: not enough values to unpack (expected 3, got 2)

I ended up using the function called when LIST_AUTOSIZE_CONTENT_OR_HEADER, but reducing the number of **dummy** variables. To be consistent, I did the same for LIST_AUTOSIZE_USEHEADER.
2020-08-28 11:41:54 -05:00
Ryan Nazaretian
597dc00d20 Update hypertreelist.py 2020-08-28 11:30:45 -05:00
Carnë Draug
2d295b29c3 eventwatcher.EventChooser: fix using wx.CheckListBox (closes #1780) 2020-08-27 19:09:44 +01:00