Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Spin controls missing all or part of spin buttons under GTK3. #1086
Operating system: manjaro linux
Description of the problem:
I see the same results with any theme.
referenced this issue
Nov 28, 2018
I don't think so. This isn't specific to the demo - that was just the easiest way to show the behaviour, but I first saw it in my own app.…
On Mon, 31 Dec 2018, 20:01 Robin Dunn ***@***.*** wrote: Did #1090 <#1090> solve this? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1086 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AE5pr8QAuinVO_A1uI-3iuVDSNw7MWE7ks5u-m0kgaJpZM4Yt9S5> .
I was determining the size from the maximum string length the control will contain. It looks like that calculation is only leaving enough space for (not quite) one of the two spin buttons.
import wx class TestFrame(wx.Frame): def __init__(self, *args, **kwargs): kwargs['style'] = wx.DEFAULT_FRAME_STYLE super(TestFrame, self).__init__(*args, **kwargs) sizer = wx.BoxSizer(wx.HORIZONTAL) lsizer = wx.BoxSizer(wx.VERTICAL) rsizer = wx.BoxSizer(wx.VERTICAL) panel = wx.Panel(self) lwidgets =  rwidgets =  for i in range(1,11): sc = wx.SpinCtrl(self) sc.SetMinSize(sc.GetSizeFromTextSize(sc.GetTextExtent("0" * i))) lwidgets.append(sc) scd = wx.SpinCtrlDouble(self) scd.SetMinSize(scd.GetSizeFromTextSize(scd.GetTextExtent("0" * i))) rwidgets.append(scd) lsizer.AddMany(lwidgets) rsizer.AddMany(rwidgets) sizer.AddMany((lsizer,rsizer)) panel.SetSizerAndFit(sizer) if __name__ == "__main__": app = wx.App(False) TestFrame(None).Show() app.MainLoop()
I suspect that the issue is a combination of the native eidget behavor having a min size of the text portion (and not sliding the buttons over beyond that) and wxGTK's implementation of
In the meantime the best I can suggest is to not set the minsize on these widgets and let their default best size be used by the sizers, or add some extra fixed size to the value you get back from
Ah, right - it's a wxWidgets thing. Sorry - thought it was probably a Phoenix thing, as I didn't see the same behaviour in the wxWidgets demos.…
On Thu, 3 Jan 2019 at 04:28, Scott Talbert ***@***.***> wrote: I think I found the problem, this has been fixed in wx master but not in WX_3_0_BRANCH. I opened a PR to get the fix backported: wxWidgets/wxWidgets#1109 <wxWidgets/wxWidgets#1109> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1086 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AE5pr06HmETyEAJwh75XUl5Uhfh5qJ4tks5u_YbUgaJpZM4Yt9S5> .
________________________________ Mick Phillips