layout adaptions for mac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -263,15 +263,23 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
styleDlg &= ~wxRESIZE_BORDER;
|
styleDlg &= ~wxRESIZE_BORDER;
|
||||||
styleDlg &= ~wxCAPTION;
|
styleDlg &= ~wxCAPTION;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg & (~wxCANCEL) ) )
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
|
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
// 1) text message
|
// 1) text message
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
// align text and list at least on mac
|
||||||
|
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(15,0) );
|
||||||
|
#else
|
||||||
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
|
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
|
||||||
|
#endif
|
||||||
// 2) list box
|
// 2) list box
|
||||||
m_listbox = CreateList(n,choices,styleLbox);
|
m_listbox = CreateList(n,choices,styleLbox);
|
||||||
|
|
||||||
@@ -287,9 +295,12 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
|
|
||||||
#else // __SMARTPHONE__/!__SMARTPHONE__
|
#else // __SMARTPHONE__/!__SMARTPHONE__
|
||||||
|
|
||||||
|
// Mac Human Interface Guidelines recommend not to use static lines as grouping elements
|
||||||
|
#ifndef __WXMAC__
|
||||||
#if wxUSE_STATLINE
|
#if wxUSE_STATLINE
|
||||||
// 3) static line
|
// 3) static line
|
||||||
topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
|
topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// 4) buttons
|
// 4) buttons
|
||||||
|
Reference in New Issue
Block a user