show as many items as possible on macOS 10.13+
on these systems scrollbars on comboboxes are not always shown, even if the system is configured to do so, in these cases show all possible to avoid the impression of a limited subset see https://github.com/wxWidgets/wxWidgets/pull/1534/files
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/osx/private/available.h"
|
||||||
#include "wx/osx/cocoa/private/textimpl.h"
|
#include "wx/osx/cocoa/private/textimpl.h"
|
||||||
|
|
||||||
// work in progress
|
// work in progress
|
||||||
@@ -347,7 +348,10 @@ wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxComboBox* wxpeer,
|
|||||||
{
|
{
|
||||||
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
|
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
|
||||||
wxNSComboBox* v = [[wxNSComboBox alloc] initWithFrame:r];
|
wxNSComboBox* v = [[wxNSComboBox alloc] initWithFrame:r];
|
||||||
[v setNumberOfVisibleItems:13];
|
if (WX_IS_MACOS_AVAILABLE(10, 13))
|
||||||
|
[v setNumberOfVisibleItems:999];
|
||||||
|
else
|
||||||
|
[v setNumberOfVisibleItems:13];
|
||||||
if (style & wxCB_READONLY)
|
if (style & wxCB_READONLY)
|
||||||
[v setEditable:NO];
|
[v setEditable:NO];
|
||||||
wxNSComboBoxControl* c = new wxNSComboBoxControl( wxpeer, v );
|
wxNSComboBoxControl* c = new wxNSComboBoxControl( wxpeer, v );
|
||||||
|
Reference in New Issue
Block a user