sync to OT repository, simplify drawing code and remove dark edge at first attr column
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -41,6 +41,7 @@ All rights reserved.
|
|||||||
#include <PopUpMenu.h>
|
#include <PopUpMenu.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "Commands.h"
|
#include "Commands.h"
|
||||||
@@ -114,6 +115,7 @@ BTitleView::BTitleView(BRect frame, BPoseView *view)
|
|||||||
SetHighColor(sTitleBackground);
|
SetHighColor(sTitleBackground);
|
||||||
SetLowColor(sTitleBackground);
|
SetLowColor(sTitleBackground);
|
||||||
SetViewColor(sTitleBackground);
|
SetViewColor(sTitleBackground);
|
||||||
|
//SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
|
|
||||||
BFont font(be_plain_font);
|
BFont font(be_plain_font);
|
||||||
font.SetSize(9);
|
font.SetSize(9);
|
||||||
@@ -240,15 +242,18 @@ BTitleView::Draw(BRect, bool useOffscreen, bool updateOnly,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// first and last shades before and after first column
|
// first and last shades before and after first column
|
||||||
BRect tmp(bounds);
|
maxx++;
|
||||||
tmp.right = maxx;
|
minx--;
|
||||||
tmp.left = minx;
|
|
||||||
tmp.InsetBy(-1, 0);
|
|
||||||
view->BeginLineArray(2);
|
view->BeginLineArray(2);
|
||||||
view->AddLine(tmp.LeftTop(), tmp.LeftBottom(), sShadowColor);
|
view->AddLine(BPoint(minx, bounds.top),
|
||||||
view->AddLine(tmp.RightTop(), tmp.RightBottom(), sShineColor);
|
BPoint(minx, bounds.bottom), sShadowColor);
|
||||||
|
view->AddLine(BPoint(maxx, bounds.top),
|
||||||
|
BPoint(maxx, bounds.bottom), sShineColor);
|
||||||
view->EndLineArray();
|
view->EndLineArray();
|
||||||
|
|
||||||
|
FillRect(BRect(bounds.left, bounds.top + 1, minx - 1, bounds.bottom - 1), B_SOLID_LOW);
|
||||||
|
FillRect(BRect(maxx + 1, bounds.top + 1, bounds.right, bounds.bottom - 1), B_SOLID_LOW);
|
||||||
|
|
||||||
if (useOffscreen) {
|
if (useOffscreen) {
|
||||||
if (trackRectBlitter)
|
if (trackRectBlitter)
|
||||||
(trackRectBlitter)(view, passThru);
|
(trackRectBlitter)(view, passThru);
|
||||||
@@ -478,9 +483,8 @@ BColumnTitle::Draw(BView *view, bool pressed)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
view->MovePenTo(loc);
|
|
||||||
view->SetHighColor(0, 0, 0);
|
view->SetHighColor(0, 0, 0);
|
||||||
view->DrawString(titleString.String());
|
view->DrawString(titleString.String(), loc);
|
||||||
|
|
||||||
// show sort columns
|
// show sort columns
|
||||||
bool secondary = (fColumn->AttrHash() == fParent->PoseView()->SecondarySort());
|
bool secondary = (fColumn->AttrHash() == fParent->PoseView()->SecondarySort());
|
||||||
|
|||||||
Reference in New Issue
Block a user