]> git.saurik.com Git - wxWidgets.git/commitdiff
Slightly improve wx[Generic]RichMessageDialog layout.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Aug 2010 15:41:24 +0000 (15:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Aug 2010 15:41:24 +0000 (15:41 +0000)
Keep the icon at the top instead of centering it, this is more consistent with
the native behaviour under both MSW and GTK.

Get rid of an unnecessary sizer in wxGenericRichMessageDialog and give the
checkbox the right border to align with the rest of the dialog contents.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/msgdlgg.cpp
src/generic/richmsgdlgg.cpp

index 9cbdca770ec38c1cd99f4e734907ef702eeeccb5..ec6e7e924fda8857369b55ae9b0d9304ddb7f2d7 100644 (file)
@@ -116,7 +116,7 @@ void wxGenericMessageDialog::DoCreateMsgdialog()
         if (is_pda)
             topsizer->Add( icon, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 );
         else
-            icon_text->Add( icon, 0, wxCENTER );
+            icon_text->Add(icon, wxSizerFlags().Top().Border(wxRIGHT, 20));
     }
 #endif // wxUSE_STATBMP
 
index 06b226d4f6c0fd1a41599b4efce140ca8d707a8b..c656332a6817057d410e725b24757d9ee091fa43 100644 (file)
@@ -53,15 +53,10 @@ void wxGenericRichMessageDialog::AddMessageDialogCheckBox(wxSizer *sizer)
 {
     if ( !m_checkBoxText.empty() )
     {
-        wxSizer *sizerCheckBox = new wxBoxSizer( wxHORIZONTAL );
+        m_checkBox = new wxCheckBox(this, wxID_ANY, m_checkBoxText);
+        m_checkBox->SetValue(m_checkBoxValue);
 
-        m_checkBox = new wxCheckBox( this,
-                                     wxID_ANY,
-                                     m_checkBoxText );
-        m_checkBox->SetValue( m_checkBoxValue );
-        sizerCheckBox->Add( m_checkBox, 0, wxBOTTOM | wxALIGN_LEFT );
-
-        sizer->Add( sizerCheckBox, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 );
+        sizer->Add(m_checkBox, wxSizerFlags().Left().Border(wxLEFT|wxTOP, 10));
     }
 }