]> git.saurik.com Git - wxWidgets.git/commitdiff
made wxADJUST_MINSIZE default
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Mar 2004 10:18:38 +0000 (10:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Mar 2004 10:18:38 +0000 (10:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/sizer.tex
include/wx/defs.h
src/common/sizer.cpp
src/html/helpfrm.cpp

index b28edf74e548d50a574698e9effbfab7513672ef..7b12d315238623aa11b2020e72a613aac8be6256 100644 (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.}
 
index d2bd046176ead6f8ebb90efb78afafdf14fbedb8..da04c2e3052fb83eb950ab64401702f9974d1b37 100644 (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 */
index 4cee972c0065b5939a28edb1356d8ae43c5f1746..b6e4498e287fc1fb4759948079013749febce075 100644 (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 )
index ac2b31819d1de256432e9d06509c7fe269a302a2..2a2e01fd40d310abf660353a3d18098c7b1ac634 100644 (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;