Fixed drawing of the marker line backgrounds. They were off by the font
descent. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33432 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d159cdcf4e
commit
9cad16b96e
@ -41,9 +41,8 @@
|
||||
static const int32 kLeftTextMargin = 3;
|
||||
static const float kMinViewHeight = 80.0f;
|
||||
static const int32 kSpacesPerTab = 4;
|
||||
static const bigtime_t kScrollTimer = 10000LL;
|
||||
|
||||
// TODO: Should be settable!
|
||||
static const bigtime_t kScrollTimer = 10000LL;
|
||||
|
||||
|
||||
class SourceView::BaseView : public BView {
|
||||
@ -1015,8 +1014,7 @@ SourceView::TextView::Draw(BRect updateRect)
|
||||
int32 markerIndex = 0;
|
||||
for (int32 i = minLine; i <= maxLine; i++) {
|
||||
SetLowColor(ViewColor());
|
||||
float y = (float)(i + 1) * fFontInfo->lineHeight
|
||||
- fFontInfo->fontHeight.descent;
|
||||
float y = i * fFontInfo->lineHeight;
|
||||
BString lineString;
|
||||
_FormatLine(fSourceCode->LineAt(i), lineString);
|
||||
|
||||
@ -1032,13 +1030,15 @@ SourceView::TextView::Draw(BRect updateRect)
|
||||
SetLowColor(96, 216, 216, 255);
|
||||
else
|
||||
SetLowColor(255, 255, 0, 255);
|
||||
FillRect(BRect(kLeftTextMargin, y - fFontInfo->lineHeight,
|
||||
Bounds().right, y), B_SOLID_LOW);
|
||||
FillRect(BRect(kLeftTextMargin, y, Bounds().right,
|
||||
y + fFontInfo->lineHeight), B_SOLID_LOW);
|
||||
break;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
DrawString(lineString, BPoint(kLeftTextMargin, y));
|
||||
|
||||
DrawString(lineString,
|
||||
BPoint(kLeftTextMargin, y + fFontInfo->fontHeight.ascent));
|
||||
}
|
||||
|
||||
if (fSelectionStart.line != -1 && fSelectionEnd.line != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user