Ticket #15619 (closed defect: fixed)
gtk3: wxSpinButton has a very wrong best-size
|Reported by:||dghart||Owned by:|
|Keywords:||wxSpinButton gtk3 width||Cc:|
Testing a gtk3 build of wxGTK-3.0rc, I've been pleasantly surprised at how good it now is. The samples, and my app, 'just work'; except for theme/theme-engine issues in older gtk versions (debian wheezy, ubuntu 13.04 and 10), and these have disappeared in fedora 19's gtk-3.8.6.
The exception is wxSpinButton. As can be seen in the attached screenshots of the 'widgets' sample, this is far too narrow to be used; on some distros it can't even be identified.
The src/gtk/spinbutt.cpp wxSpinButton::DoGetBestSize sets a hard-coded value and has a // FIXME. Presumably the correct size can't easily be deduced from the native GtkSpinButton, as this comes with a compulsory text-entry section. Until a real solution is found, the attached patch sets a better guesstimate. This is correct for debian (kde) and, though it's too small for fedora and ubuntu/unity, it's easily usable. Making it any wider means the text-entry section starts appearing on debian; I feel that's a worse fault, but you may disagree.