fix more glitches:
* invalidate the correct rect on WindowActivated() in case fDivider is not correclty maintained * don't cut off part of the label in Draw() by constraining the clipping in case the placement of the label is a little different than intented git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22135 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -354,10 +354,9 @@ BTextControl::Draw(BRect updateRect)
|
||||
break;
|
||||
}
|
||||
|
||||
BRect labelArea(x, fText->Frame().top, x + labelWidth,
|
||||
ceilf(fontHeight.ascent + fontHeight.descent) + 1);
|
||||
BRect labelArea(x, Bounds().top, x + labelWidth, Bounds().bottom);
|
||||
if (x < fDivider && updateRect.Intersects(labelArea)) {
|
||||
labelArea.right = fDivider;
|
||||
labelArea.right = fText->Frame().left - 3;
|
||||
|
||||
BRegion clipRegion(labelArea);
|
||||
ConstrainClippingRegion(&clipRegion);
|
||||
@@ -606,8 +605,8 @@ BTextControl::WindowActivated(bool active)
|
||||
{
|
||||
if (fText->IsFocus()) {
|
||||
// invalidate to remove/show focus indication
|
||||
BRect rect = Bounds();
|
||||
rect.left = fDivider;
|
||||
BRect rect = fText->Frame();
|
||||
rect.InsetBy(-1, -1);
|
||||
Invalidate(rect);
|
||||
|
||||
// help out embedded text view which doesn't
|
||||
|
||||
Reference in New Issue
Block a user