made wxADJUST_MINSIZE default

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-03-29 10:18:38 +00:00
parent 8ab505498d
commit 395a82b13f
4 changed files with 17 additions and 19 deletions

View File

@@ -106,11 +106,7 @@ to 0 and thus represent the default, wxALIGN\_RIGHT and wxALIGN\_BOTTOM have
their obvious meaning). With proportional resize, a child may also be centered
in the main orientation using wxALIGN\_CENTER\_VERTICAL (same as
wxALIGN\_CENTRE\_VERTICAL) and wxALIGN\_CENTER\_HORIZONTAL (same as
wxALIGN\_CENTRE\_HORIZONTAL) flags. Finally, you can also specify
wxADJUST\_MINSIZE flag to make the minimal size of the control dynamically adjust
to the value returned by its \helpref{GetAdjustedBestSize()}{wxwindowgetadjustedbestsize}
method - this allows, for example, for correct relayouting of a static text
control even if its text is changed during run-time.}
wxALIGN\_CENTRE\_HORIZONTAL) flags.}
\docparam{border}{Determines the border width, if the {\it flag} parameter is set to any border.}

View File

@@ -1031,8 +1031,11 @@ enum wxStretch
wxGROW = 0x2000,
wxEXPAND = wxGROW,
wxSHAPED = 0x4000,
wxADJUST_MINSIZE = 0x8000,
wxTILE = 0xc000
// free value: 0x8000 (old wxADJUST_MINSIZE)
wxTILE = 0xc000,
// for compatibility only, default now, don't use explicitly any more
wxADJUST_MINSIZE = 0x0000
};
/* border flags: the values are chosen for backwards compatibility */

View File

@@ -193,12 +193,10 @@ wxSize wxSizerItem::CalcMin()
}
else
{
if ( IsWindow() && (m_flag & wxADJUST_MINSIZE) )
if ( IsWindow() )
{
// By user request, keep the minimal size for this item
// in sync with the largest of BestSize and any user supplied
// minimum size hint. Useful in cases where the item is
// changeable -- static text labels, etc.
// the size of the window may change during run-time, we should
// use the current minimal size
m_minSize = m_window->GetAdjustedBestSize();
}
@@ -1140,10 +1138,11 @@ wxSize wxFlexGridSizer::CalcMin()
m_rowHeights.SetCount(nrows);
m_colWidths.SetCount(ncols);
// We have to recalcuate the sizes in case an item has wxADJUST_MINSIZE, has changed
// minimum size since the previous layout, or has been hidden using wxSizer::Show().
// If all the items in a row/column are hidden, the final dimension of the row/column
// will be -1, indicating that the column itself is hidden.
// We have to recalcuate the sizes in case the item minimum size has
// changed since the previous layout, or the item has been hidden using
// wxSizer::Show(). If all the items in a row/column are hidden, the final
// dimension of the row/column will be -1, indicating that the column
// itself is hidden.
for( s = m_rowHeights.GetCount(), i = 0; i < s; ++i )
m_rowHeights[ i ] = -1;
for( s = m_colWidths.GetCount(), i = 0; i < s; ++i )

View File

@@ -377,7 +377,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
m_ContentsBox->AssignImageList(ContentsImageList);
topsizer->Add(m_ContentsBox, 1,
wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT | wxADJUST_MINSIZE,
wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT,
2);
m_NavigNotebook->AddPage(dummy, _("Contents"));
@@ -419,7 +419,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
topsizer->Add(btsizer, 0,
wxALIGN_RIGHT | wxLEFT | wxRIGHT | wxBOTTOM, 10);
topsizer->Add(m_IndexCountInfo, 0, wxEXPAND | wxLEFT | wxRIGHT, 2);
topsizer->Add(m_IndexList, 1, wxEXPAND | wxALL | wxADJUST_MINSIZE, 2);
topsizer->Add(m_IndexList, 1, wxEXPAND | wxALL, 2);
m_NavigNotebook->AddPage(dummy, _("Index"));
m_IndexPage = notebook_page++;
@@ -455,7 +455,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
sizer->Add(m_SearchCaseSensitive, 0, wxLEFT | wxRIGHT, 10);
sizer->Add(m_SearchWholeWords, 0, wxLEFT | wxRIGHT, 10);
sizer->Add(m_SearchButton, 0, wxALL | wxALIGN_RIGHT, 8);
sizer->Add(m_SearchList, 1, wxALL | wxEXPAND | wxADJUST_MINSIZE, 2);
sizer->Add(m_SearchList, 1, wxALL | wxEXPAND, 2);
m_NavigNotebook->AddPage(dummy, _("Search"));
m_SearchPage = notebook_page;