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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36217 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -871,5 +871,6 @@ BBox::_ValidateLayoutData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fLayoutData->valid = true;
|
fLayoutData->valid = true;
|
||||||
|
ResetLayoutInvalidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -611,6 +611,8 @@ BCheckBox::_ValidatePreferredSize()
|
|||||||
|
|
||||||
fPreferredSize.height = (float)ceil(6.0f + fontHeight.ascent
|
fPreferredSize.height = (float)ceil(6.0f + fontHeight.ascent
|
||||||
+ fontHeight.descent);
|
+ fontHeight.descent);
|
||||||
|
|
||||||
|
ResetLayoutInvalidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fPreferredSize;
|
return fPreferredSize;
|
||||||
|
|||||||
@@ -2034,6 +2034,7 @@ BMenu::_ValidatePreferredSize()
|
|||||||
if (!fLayoutData->preferred.IsWidthSet() || ResizingMode()
|
if (!fLayoutData->preferred.IsWidthSet() || ResizingMode()
|
||||||
!= fLayoutData->lastResizingMode) {
|
!= fLayoutData->lastResizingMode) {
|
||||||
_ComputeLayout(0, true, false, NULL, NULL);
|
_ComputeLayout(0, true, false, NULL, NULL);
|
||||||
|
ResetLayoutInvalidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fLayoutData->preferred;
|
return fLayoutData->preferred;
|
||||||
|
|||||||
@@ -1113,6 +1113,7 @@ BMenuField::_ValidateLayoutData()
|
|||||||
fLayoutData->min = min;
|
fLayoutData->min = min;
|
||||||
|
|
||||||
fLayoutData->valid = true;
|
fLayoutData->valid = true;
|
||||||
|
ResetLayoutInvalidation();
|
||||||
|
|
||||||
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2146,6 +2146,8 @@ BSlider::_ValidateMinSize()
|
|||||||
fMinSize.width = width;
|
fMinSize.width = width;
|
||||||
fMinSize.height = height;
|
fMinSize.height = height;
|
||||||
|
|
||||||
|
ResetLayoutInvalidation();
|
||||||
|
|
||||||
return fMinSize;
|
return fMinSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ BStringView::_ValidatePreferredSize()
|
|||||||
|
|
||||||
fPreferredSize.height = ceilf(fontHeight.ascent + fontHeight.descent
|
fPreferredSize.height = ceilf(fontHeight.ascent + fontHeight.descent
|
||||||
+ fontHeight.leading);
|
+ fontHeight.leading);
|
||||||
|
|
||||||
|
ResetLayoutInvalidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fPreferredSize;
|
return fPreferredSize;
|
||||||
|
|||||||
@@ -1115,6 +1115,7 @@ BTextControl::_ValidateLayoutData()
|
|||||||
fLayoutData->min = min;
|
fLayoutData->min = min;
|
||||||
|
|
||||||
fLayoutData->valid = true;
|
fLayoutData->valid = true;
|
||||||
|
ResetLayoutInvalidation();
|
||||||
|
|
||||||
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1095,7 +1095,7 @@ BTextView::Perform(perform_code code, void* _data)
|
|||||||
BTextView::GetHeightForWidth(data->width, &data->min, &data->max,
|
BTextView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||||
&data->preferred);
|
&data->preferred);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
case PERFORM_CODE_SET_LAYOUT:
|
case PERFORM_CODE_SET_LAYOUT:
|
||||||
{
|
{
|
||||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||||
@@ -2823,6 +2823,7 @@ BTextView::_ValidateLayoutData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fLayoutData->valid = true;
|
fLayoutData->valid = true;
|
||||||
|
ResetLayoutInvalidation();
|
||||||
|
|
||||||
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
TRACE("width: %.2f, height: %.2f\n", min.width, min.height);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user