X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79b7701c0bc547dc4b579258c7116700e5925162..ec080ef1873995bcd9b20b0fc1a6d208a78540d3:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index f625571409..518ccce91f 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -2334,7 +2334,7 @@ wxSize wxBoxSizer::CalcMin() // Using the max ratio ensures that the min size is big enough for all // items to have their min size and satisfy the proportions among them. - SizeInMajorDir(m_minSize) += maxMinSizeToProp*m_totalProportion; + SizeInMajorDir(m_minSize) += (int)(maxMinSizeToProp*m_totalProportion); return m_minSize; } @@ -2578,19 +2578,35 @@ void wxStdDialogButtonSizer::Realize() Add((wxWindow*)m_buttonNegative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); } - // according to HIG, in explicit apply windows the order is: - // [ Help Apply Cancel OK ] if (m_buttonApply) - Add((wxWindow*)m_buttonApply, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); + { + // according to HIG, in explicit apply windows the order is: + // [ Help Apply Cancel OK ] - if (m_buttonCancel){ - Add((wxWindow*)m_buttonCancel, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); - // Cancel or help should be default - // m_buttonCancel->SetDefaultButton(); + Add((wxWindow*)m_buttonApply, + 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); + + if (m_buttonCancel) + Add((wxWindow*)m_buttonCancel, + 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); + + if (m_buttonAffirmative) + Add((wxWindow*)m_buttonAffirmative, + 0, wxALIGN_CENTRE | wxLEFT, 6); + } + else + { + // without an Apply button, have the buttons representing + // affirmative and negative close to each other. + + if (m_buttonAffirmative) + Add((wxWindow*)m_buttonAffirmative, + 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); + + if (m_buttonCancel) + Add((wxWindow*)m_buttonCancel, 0, wxALIGN_CENTRE | wxLEFT, 6); } - if (m_buttonAffirmative) - Add((wxWindow*)m_buttonAffirmative, 0, wxALIGN_CENTRE | wxLEFT, 6); #elif defined(__WXMSW__) // Windows