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:
@@ -41,9 +41,8 @@
|
|||||||
static const int32 kLeftTextMargin = 3;
|
static const int32 kLeftTextMargin = 3;
|
||||||
static const float kMinViewHeight = 80.0f;
|
static const float kMinViewHeight = 80.0f;
|
||||||
static const int32 kSpacesPerTab = 4;
|
static const int32 kSpacesPerTab = 4;
|
||||||
static const bigtime_t kScrollTimer = 10000LL;
|
|
||||||
|
|
||||||
// TODO: Should be settable!
|
// TODO: Should be settable!
|
||||||
|
static const bigtime_t kScrollTimer = 10000LL;
|
||||||
|
|
||||||
|
|
||||||
class SourceView::BaseView : public BView {
|
class SourceView::BaseView : public BView {
|
||||||
@@ -1015,8 +1014,7 @@ SourceView::TextView::Draw(BRect updateRect)
|
|||||||
int32 markerIndex = 0;
|
int32 markerIndex = 0;
|
||||||
for (int32 i = minLine; i <= maxLine; i++) {
|
for (int32 i = minLine; i <= maxLine; i++) {
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
float y = (float)(i + 1) * fFontInfo->lineHeight
|
float y = i * fFontInfo->lineHeight;
|
||||||
- fFontInfo->fontHeight.descent;
|
|
||||||
BString lineString;
|
BString lineString;
|
||||||
_FormatLine(fSourceCode->LineAt(i), lineString);
|
_FormatLine(fSourceCode->LineAt(i), lineString);
|
||||||
|
|
||||||
@@ -1032,13 +1030,15 @@ SourceView::TextView::Draw(BRect updateRect)
|
|||||||
SetLowColor(96, 216, 216, 255);
|
SetLowColor(96, 216, 216, 255);
|
||||||
else
|
else
|
||||||
SetLowColor(255, 255, 0, 255);
|
SetLowColor(255, 255, 0, 255);
|
||||||
FillRect(BRect(kLeftTextMargin, y - fFontInfo->lineHeight,
|
FillRect(BRect(kLeftTextMargin, y, Bounds().right,
|
||||||
Bounds().right, y), B_SOLID_LOW);
|
y + fFontInfo->lineHeight), B_SOLID_LOW);
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DrawString(lineString, BPoint(kLeftTextMargin, y));
|
|
||||||
|
DrawString(lineString,
|
||||||
|
BPoint(kLeftTextMargin, y + fFontInfo->fontHeight.ascent));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fSelectionStart.line != -1 && fSelectionEnd.line != -1) {
|
if (fSelectionStart.line != -1 && fSelectionEnd.line != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user