mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Merge branch 'master' into 4.1-first-pass
This commit is contained in:
22
CHANGES.rst
22
CHANGES.rst
@@ -8,6 +8,7 @@
|
||||
wxPython Changelog
|
||||
==================
|
||||
|
||||
|
||||
4.1.0
|
||||
-----
|
||||
* (not yet released)
|
||||
@@ -29,6 +30,27 @@ Other changes in this release:
|
||||
|
||||
|
||||
|
||||
4.0.2
|
||||
-----
|
||||
* (not yet released)
|
||||
|
||||
PyPI: https://pypi.python.org/pypi/wxPython/4.0.2
|
||||
Extras: https://extras.wxPython.org/wxPython4/extras/
|
||||
Pip: ``pip install wxPython==4.0.2``
|
||||
|
||||
Changes in this release include the following:
|
||||
|
||||
* Fixed wx.html2.EVT_WEBVIEW_NAVIGATING event not being sent on some versions
|
||||
of Linux. (#741)
|
||||
|
||||
* wx.Sizers can now be used as an iterator to iterate over the items within
|
||||
the sizer. (#738)
|
||||
|
||||
* Fix Python3 division in ThumbnailCtrl. (#746)
|
||||
|
||||
|
||||
|
||||
|
||||
4.0.1 "Lemonade"
|
||||
----------------
|
||||
* 2-Feb-2018
|
||||
|
||||
2
build.py
2
build.py
@@ -1731,6 +1731,8 @@ def cmd_clean_vagrant(options, args):
|
||||
if os.path.exists(d):
|
||||
shutil.rmtree(d)
|
||||
|
||||
def cmd_clean_all(options, args):
|
||||
cmd_cleanall(options, args)
|
||||
|
||||
def cmd_cleanall(options, args):
|
||||
# These take care of all the object, lib, shared lib files created by the
|
||||
|
||||
@@ -154,8 +154,12 @@ def run():
|
||||
import wx.siplib
|
||||
return not wx.siplib.isdeleted(self)
|
||||
""")
|
||||
c.addPyCode('Sizer.__bool__ = Sizer.__nonzero__') # For Python 3
|
||||
|
||||
c.addPyMethod('__iter__', '(self)',
|
||||
doc = "A Py convenience method that allows Sizers to act as iterables that will yield their wx.SizerItems.",
|
||||
body = "for item in self.GetChildren(): yield item")
|
||||
|
||||
c.addPyCode('Sizer.__bool__ = Sizer.__nonzero__') # For Python 3
|
||||
|
||||
|
||||
#---------------------------------------------
|
||||
|
||||
@@ -71,6 +71,15 @@ class sizer_Tests(wtc.WidgetTestCase):
|
||||
self.assertTrue(items[1].IsSpacer())
|
||||
self.assertTrue(items[2].Border == 5)
|
||||
|
||||
def test_iter(self):
|
||||
bs = wx.BoxSizer()
|
||||
widgetlist = [wx.Panel(self.frame) for _ in range(5)]
|
||||
|
||||
sizeritems = [x for x in bs]
|
||||
for item in sizeritems:
|
||||
self.assertTrue(isinstance(item, wx.SizerItem))
|
||||
|
||||
self.assertTrue([x.GetWidget() for x in bs] == widgetlist)
|
||||
|
||||
def test_sizerSpacers1(self):
|
||||
bs = wx.BoxSizer()
|
||||
|
||||
@@ -1790,7 +1790,7 @@ class ScrolledThumbnail(wx.ScrolledWindow):
|
||||
:param `y`: the mouse `y` position.
|
||||
"""
|
||||
|
||||
col = (x - self._tBorder)/(self._tWidth + self._tBorder)
|
||||
col = (x - self._tBorder)//(self._tWidth + self._tBorder)
|
||||
|
||||
if col >= self._cols:
|
||||
col = self._cols - 1
|
||||
@@ -1942,7 +1942,7 @@ class ScrolledThumbnail(wx.ScrolledWindow):
|
||||
return
|
||||
|
||||
# get row
|
||||
row = self.GetSelection()/self._cols
|
||||
row = self.GetSelection()//self._cols
|
||||
# calc position to scroll view
|
||||
|
||||
paintRect = self.GetPaintRect()
|
||||
@@ -2586,4 +2586,3 @@ class ScrolledThumbnail(wx.ScrolledWindow):
|
||||
self.Refresh()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user