MarkerView: rework drawing to reduce flicker.
Addresses another part of #9841.
This commit is contained in:
@@ -184,6 +184,7 @@ private:
|
|||||||
MarkerManager* fMarkerManager;
|
MarkerManager* fMarkerManager;
|
||||||
StackTrace* fStackTrace;
|
StackTrace* fStackTrace;
|
||||||
StackFrame* fStackFrame;
|
StackFrame* fStackFrame;
|
||||||
|
rgb_color fBackgroundColor;
|
||||||
rgb_color fBreakpointOptionMarker;
|
rgb_color fBreakpointOptionMarker;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -837,9 +838,9 @@ SourceView::MarkerView::MarkerView(SourceView* sourceView, Team* team,
|
|||||||
fStackFrame(NULL)
|
fStackFrame(NULL)
|
||||||
{
|
{
|
||||||
rgb_color background = ui_color(B_PANEL_BACKGROUND_COLOR);
|
rgb_color background = ui_color(B_PANEL_BACKGROUND_COLOR);
|
||||||
fBreakpointOptionMarker = tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
|
fBreakpointOptionMarker = tint_color(background, B_DARKEN_1_TINT);
|
||||||
B_DARKEN_1_TINT);
|
fBackgroundColor = tint_color(background, B_LIGHTEN_2_TINT);
|
||||||
SetViewColor(tint_color(background, B_LIGHTEN_2_TINT));
|
SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -892,8 +893,11 @@ SourceView::MarkerView::MaxSize()
|
|||||||
void
|
void
|
||||||
SourceView::MarkerView::Draw(BRect updateRect)
|
SourceView::MarkerView::Draw(BRect updateRect)
|
||||||
{
|
{
|
||||||
if (fSourceCode == NULL)
|
SetLowColor(fBackgroundColor);
|
||||||
|
if (fSourceCode == NULL) {
|
||||||
|
FillRect(updateRect, B_SOLID_LOW);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the lines intersecting with the update rect
|
// get the lines intersecting with the update rect
|
||||||
int32 minLine, maxLine;
|
int32 minLine, maxLine;
|
||||||
@@ -914,6 +918,7 @@ SourceView::MarkerView::Draw(BRect updateRect)
|
|||||||
bool drawBreakpointOptionMarker = true;
|
bool drawBreakpointOptionMarker = true;
|
||||||
|
|
||||||
SourceView::MarkerManager::Marker* marker;
|
SourceView::MarkerManager::Marker* marker;
|
||||||
|
FillRect(LineRect(line), B_SOLID_LOW);
|
||||||
while ((marker = markers.ItemAt(markerIndex)) != NULL
|
while ((marker = markers.ItemAt(markerIndex)) != NULL
|
||||||
&& marker->Line() == (uint32)line) {
|
&& marker->Line() == (uint32)line) {
|
||||||
marker->Draw(this, LineRect(line));
|
marker->Draw(this, LineRect(line));
|
||||||
|
|||||||
Reference in New Issue
Block a user