Fixes for the B_NO_BORDER LOOK:
* Draw the left/top border anyways, since it just looks bad with scrollbars where the frame cannot be turned off. But, don't draw the focus indication in this mode. * Fixed layout of the views for B_NO_BORDER_LOOK. There was a one pixel overlap. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30090 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1539,11 +1539,10 @@ BColumnListView::MakeFocus(bool isFocus)
|
|||||||
if (fBorderStyle != B_NO_BORDER) {
|
if (fBorderStyle != B_NO_BORDER) {
|
||||||
// Redraw focus marks around view
|
// Redraw focus marks around view
|
||||||
Invalidate();
|
Invalidate();
|
||||||
|
fHorizontalScrollBar->SetBorderHighlighted(isFocus);
|
||||||
|
fVerticalScrollBar->SetBorderHighlighted(isFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
fHorizontalScrollBar->SetBorderHighlighted(isFocus);
|
|
||||||
fVerticalScrollBar->SetBorderHighlighted(isFocus);
|
|
||||||
|
|
||||||
BView::MakeFocus(isFocus);
|
BView::MakeFocus(isFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1696,9 +1695,23 @@ BColumnListView::Draw(BRect updateRect)
|
|||||||
if (!fHorizontalScrollBar->IsHidden())
|
if (!fHorizontalScrollBar->IsHidden())
|
||||||
horizontalScrollBarFrame = fHorizontalScrollBar->Frame();
|
horizontalScrollBarFrame = fHorizontalScrollBar->Frame();
|
||||||
|
|
||||||
|
if (fBorderStyle == B_NO_BORDER) {
|
||||||
|
// We still draw the left/top border, but not focused.
|
||||||
|
// The scrollbars cannot be displayed without frame and
|
||||||
|
// it looks bad to have no frame only along the left/top
|
||||||
|
// side.
|
||||||
|
rgb_color borderColor = tint_color(base, B_DARKEN_2_TINT);
|
||||||
|
SetHighColor(borderColor);
|
||||||
|
StrokeLine(BPoint(rect.left, rect.bottom),
|
||||||
|
BPoint(rect.left, rect.top));
|
||||||
|
StrokeLine(BPoint(rect.left + 1, rect.top),
|
||||||
|
BPoint(rect.right, rect.top));
|
||||||
|
}
|
||||||
|
|
||||||
be_control_look->DrawScrollViewFrame(this, rect, updateRect,
|
be_control_look->DrawScrollViewFrame(this, rect, updateRect,
|
||||||
verticalScrollBarFrame, horizontalScrollBarFrame,
|
verticalScrollBarFrame, horizontalScrollBarFrame,
|
||||||
base, fBorderStyle, flags);
|
base, fBorderStyle, flags);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1960,7 +1973,7 @@ BColumnListView::_GetChildViewRects(const BRect& bounds,
|
|||||||
hScrollBarRect.right -= B_V_SCROLL_BAR_WIDTH;
|
hScrollBarRect.right -= B_V_SCROLL_BAR_WIDTH;
|
||||||
|
|
||||||
// Adjust stuff so the border will fit.
|
// Adjust stuff so the border will fit.
|
||||||
if (fBorderStyle == B_PLAIN_BORDER) {
|
if (fBorderStyle == B_PLAIN_BORDER || fBorderStyle == B_NO_BORDER) {
|
||||||
titleRect.InsetBy(1, 0);
|
titleRect.InsetBy(1, 0);
|
||||||
titleRect.OffsetBy(0, 1);
|
titleRect.OffsetBy(0, 1);
|
||||||
outlineRect.InsetBy(1, 1);
|
outlineRect.InsetBy(1, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user