wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.33k stars 515 forks source link

DatePicker with DP_ALLOWNONE too small #1935

Open AndersMunch opened 3 years ago

AndersMunch commented 3 years ago

Operating system: Win 10. wxPython version & source: 4.1.1 (4.1.0 does not have this issue). Python version & source: 3.8.7.

Description of the problem:

wx.adv.DatePickerCtrl with the DP_ALLOWNONE flag is sized too small, cutting off one or more digits off the end.

billede

Code Example (click to expand) ```python import wx.adv class TestFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, 'DatePickerCtrl too small') sz = wx.BoxSizer(wx.VERTICAL) pa = wx.adv.DatePickerCtrl(self, style=wx.adv.DP_DROPDOWN|wx.adv.DP_ALLOWNONE|wx.adv.DP_SHOWCENTURY) sz.Add(pa) self.SetSizer(sz) if __name__=='__main__': app = wx.App() TestFrame().Show(True) app.MainLoop() ``` `style=wx.adv.DP_ALLOWNONE` is sufficient to trigger the bug, I only included `DP_DROPDOWN` and `DP_SHOWCENTURY` because that's what I actually use.
RobinD42 commented 3 years ago

This issue has been mentioned on Discuss wxPython. There might be relevant details there:

https://discuss.wxpython.org/t/question-what-changed-from-4-1-0-to-4-1-1/35268/1

AndersMunch commented 3 years ago

After realising that it's an all-C++ component, I added a wxWidgets ticket: https://trac.wxwidgets.org/ticket/19120.

swt2c commented 3 years ago

Fixed upstream, https://github.com/wxWidgets/wxWidgets/commit/d85d22c067773813c66285968e1a690c27cfbd76