Add wxLocale::GetOSInfo() and use it in MSW wxDateTimePickerCtrl.
This fixes the size of wxDateTimePickerCtrl in programs that don't set any specific locale: previously, the standard "%m/%d/%y" format was used for computing the best size of the control in this case, but this could have been significantly shorter than the format actually used (compare with the default "%d %b, %Y"), resulting in the control contents being truncated by default. GetOSInfo() is currently different from GetInfo() only under MSW, but we might need to make the same distinction under OS X too, so do make this function public instead of keeping it MSW-specific. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,7 +112,7 @@ wxSize wxDateTimePickerCtrl::DoGetBestSize() const
|
||||
|
||||
// Use the same native format as the underlying native control.
|
||||
#if wxUSE_INTL
|
||||
wxString s = wxDateTime::Now().Format(wxLocale::GetInfo(MSWGetFormat()));
|
||||
wxString s = wxDateTime::Now().Format(wxLocale::GetOSInfo(MSWGetFormat()));
|
||||
#else // !wxUSE_INTL
|
||||
wxString s("XXX-YYY-ZZZZ");
|
||||
#endif // wxUSE_INTL/!wxUSE_INTL
|
||||
|
||||
Reference in New Issue
Block a user