Ticket #9841: sourceview_flicker.patch

File sourceview_flicker.patch, 2.4 KB (added by anevilyak, 11 years ago)
  • src/apps/debugger/user_interface/gui/team_window/SourceView.cpp

    diff --git a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
    index 3e3a4f9..958edb3 100644
    a b SourceView::TextView::TextView(SourceView* sourceView, MarkerManager* manager,  
    10451045    fScrollRunner(NULL),
    10461046    fMarkerManager(manager)
    10471047{
    1048     SetViewColor(ui_color(B_DOCUMENT_BACKGROUND_COLOR));
     1048    SetViewColor(B_TRANSPARENT_COLOR);
    10491049    fTextColor = ui_color(B_DOCUMENT_TEXT_COLOR);
    10501050    SetFlags(Flags() | B_NAVIGABLE);
    10511051}
    SourceView::TextView::MaxSize()  
    10851085void
    10861086SourceView::TextView::Draw(BRect updateRect)
    10871087{
    1088     if (fSourceCode == NULL)
     1088    if (fSourceCode == NULL) {
     1089        SetLowColor(ui_color(B_DOCUMENT_BACKGROUND_COLOR));
     1090        FillRect(updateRect, B_SOLID_LOW);
    10891091        return;
     1092    }
    10901093
    10911094    // get the lines intersecting with the update rect
    10921095    int32 minLine, maxLine;
    SourceView::TextView::Draw(BRect updateRect)  
    11011104    SourceView::MarkerManager::InstructionPointerMarker* ipMarker;
    11021105    int32 markerIndex = 0;
    11031106    for (int32 i = minLine; i <= maxLine; i++) {
    1104         SetLowColor(ViewColor());
     1107        SetLowColor(ui_color(B_DOCUMENT_BACKGROUND_COLOR));
    11051108        float y = i * fFontInfo->lineHeight;
    11061109        BString lineString;
    11071110        _FormatLine(fSourceCode->LineAt(i), lineString);
    11081111
     1112        FillRect(BRect(0.0, y, kLeftTextMargin, y + fFontInfo->lineHeight),
     1113            B_SOLID_LOW);
    11091114        for (int32 j = markerIndex; j < markers.CountItems(); j++) {
    11101115            marker = markers.ItemAt(j);
    11111116             if (marker->Line() < (uint32)i) {
    SourceView::TextView::Draw(BRect updateRect)  
    11231128
    11241129                } else
    11251130                    SetLowColor(255, 255, 0, 255);
    1126                 FillRect(BRect(kLeftTextMargin, y, Bounds().right,
    1127                     y + fFontInfo->lineHeight), B_SOLID_LOW);
    11281131                break;
    11291132             } else
    11301133                break;
    11311134        }
    11321135
     1136        FillRect(BRect(kLeftTextMargin, y, Bounds().right,
     1137            y + fFontInfo->lineHeight), B_SOLID_LOW);
    11331138        DrawString(lineString,
    11341139            BPoint(kLeftTextMargin, y + fFontInfo->fontHeight.ascent));
    11351140    }
    SourceView::SetStackTrace(StackTrace* stackTrace, Thread* activeThread)  
    20532058
    20542059    fMarkerManager->SetStackTrace(fStackTrace);
    20552060    fMarkerView->SetStackTrace(fStackTrace);
    2056     fTextView->Invalidate();
    20572061}
    20582062
    20592063
    20602064void
    20612065SourceView::SetStackFrame(StackFrame* stackFrame)
    20622066{
     2067    TRACE_GUI("SourceView::SetStackFrame(%p)\n", stackFrame);
    20632068    if (stackFrame == fStackFrame)
    20642069        return;
    20652070