[haiku-commits] r36217 - haiku/trunk/src/kits/interface

Author: stippi
Date: 2010-04-13 15:36:49 +0200 (Tue, 13 Apr 2010)
New Revision: 36217
Changeset: http://dev.haiku-os.org/changeset/36217/haiku

Modified:
   haiku/trunk/src/kits/interface/Box.cpp
   haiku/trunk/src/kits/interface/CheckBox.cpp
   haiku/trunk/src/kits/interface/Menu.cpp
   haiku/trunk/src/kits/interface/MenuField.cpp
   haiku/trunk/src/kits/interface/Slider.cpp
   haiku/trunk/src/kits/interface/StringView.cpp
   haiku/trunk/src/kits/interface/TextControl.cpp
   haiku/trunk/src/kits/interface/TextView.cpp
Log:
bonefish+stippi:
All views which cache layout information need to call ResetLayoutInvalidation()
when they have updated the cached information. Otherwise calling
InvalidateLayout() once they are already attached to a layout may not have any
effect.


Modified: haiku/trunk/src/kits/interface/Box.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Box.cpp      2010-04-13 13:35:22 UTC (rev 
36216)
+++ haiku/trunk/src/kits/interface/Box.cpp      2010-04-13 13:36:49 UTC (rev 
36217)
@@ -871,5 +871,6 @@
        }
 
        fLayoutData->valid = true;
+       ResetLayoutInvalidation();
 }
 

Modified: haiku/trunk/src/kits/interface/CheckBox.cpp
===================================================================
--- haiku/trunk/src/kits/interface/CheckBox.cpp 2010-04-13 13:35:22 UTC (rev 
36216)
+++ haiku/trunk/src/kits/interface/CheckBox.cpp 2010-04-13 13:36:49 UTC (rev 
36217)
@@ -611,6 +611,8 @@
 
                fPreferredSize.height = (float)ceil(6.0f + fontHeight.ascent
                        + fontHeight.descent);
+
+               ResetLayoutInvalidation();
        }
 
        return fPreferredSize;

Modified: haiku/trunk/src/kits/interface/Menu.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Menu.cpp     2010-04-13 13:35:22 UTC (rev 
36216)
+++ haiku/trunk/src/kits/interface/Menu.cpp     2010-04-13 13:36:49 UTC (rev 
36217)
@@ -2034,6 +2034,7 @@
        if (!fLayoutData->preferred.IsWidthSet() || ResizingMode()
                        != fLayoutData->lastResizingMode) {
                _ComputeLayout(0, true, false, NULL, NULL);
+               ResetLayoutInvalidation();
        }
 
        return fLayoutData->preferred;

Modified: haiku/trunk/src/kits/interface/MenuField.cpp
===================================================================
--- haiku/trunk/src/kits/interface/MenuField.cpp        2010-04-13 13:35:22 UTC 
(rev 36216)
+++ haiku/trunk/src/kits/interface/MenuField.cpp        2010-04-13 13:36:49 UTC 
(rev 36217)
@@ -1113,6 +1113,7 @@
        fLayoutData->min = min;
 
        fLayoutData->valid = true;
+       ResetLayoutInvalidation();
 
        TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
 }

Modified: haiku/trunk/src/kits/interface/Slider.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Slider.cpp   2010-04-13 13:35:22 UTC (rev 
36216)
+++ haiku/trunk/src/kits/interface/Slider.cpp   2010-04-13 13:36:49 UTC (rev 
36217)
@@ -2146,6 +2146,8 @@
        fMinSize.width = width;
        fMinSize.height = height;
 
+       ResetLayoutInvalidation();
+
        return fMinSize;
 }
 

Modified: haiku/trunk/src/kits/interface/StringView.cpp
===================================================================
--- haiku/trunk/src/kits/interface/StringView.cpp       2010-04-13 13:35:22 UTC 
(rev 36216)
+++ haiku/trunk/src/kits/interface/StringView.cpp       2010-04-13 13:36:49 UTC 
(rev 36217)
@@ -438,6 +438,8 @@
        
                fPreferredSize.height = ceilf(fontHeight.ascent + 
fontHeight.descent 
                        + fontHeight.leading);
+
+               ResetLayoutInvalidation();
        }
 
        return fPreferredSize;

Modified: haiku/trunk/src/kits/interface/TextControl.cpp
===================================================================
--- haiku/trunk/src/kits/interface/TextControl.cpp      2010-04-13 13:35:22 UTC 
(rev 36216)
+++ haiku/trunk/src/kits/interface/TextControl.cpp      2010-04-13 13:36:49 UTC 
(rev 36217)
@@ -1115,6 +1115,7 @@
        fLayoutData->min = min;
 
        fLayoutData->valid = true;
+       ResetLayoutInvalidation();
 
        TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
 }

Modified: haiku/trunk/src/kits/interface/TextView.cpp
===================================================================
--- haiku/trunk/src/kits/interface/TextView.cpp 2010-04-13 13:35:22 UTC (rev 
36216)
+++ haiku/trunk/src/kits/interface/TextView.cpp 2010-04-13 13:36:49 UTC (rev 
36217)
@@ -1095,7 +1095,7 @@
                        BTextView::GetHeightForWidth(data->width, &data->min, 
&data->max,
                                &data->preferred);
                        return B_OK;
-}
+               }
                case PERFORM_CODE_SET_LAYOUT:
                {
                        perform_data_set_layout* data = 
(perform_data_set_layout*)_data;
@@ -2823,6 +2823,7 @@
        }
 
        fLayoutData->valid = true;
+       ResetLayoutInvalidation();
 
        TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
 }


Other related posts:

  • » [haiku-commits] r36217 - haiku/trunk/src/kits/interface - superstippi