Ticket #9841: markerview.patch

File markerview.patch, 1.7 KB (added by anevilyak, 11 years ago)

Fix flicker in breakpoint marker view

  • 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 958edb3..cfbef95 100644
    a b private:  
    184184            MarkerManager*      fMarkerManager;
    185185            StackTrace*         fStackTrace;
    186186            StackFrame*         fStackFrame;
     187            rgb_color           fBackgroundColor;
    187188            rgb_color           fBreakpointOptionMarker;
    188189};
    189190
    SourceView::MarkerView::MarkerView(SourceView* sourceView, Team* team,  
    837838    fStackFrame(NULL)
    838839{
    839840    rgb_color background = ui_color(B_PANEL_BACKGROUND_COLOR);
    840     fBreakpointOptionMarker = tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
    841         B_DARKEN_1_TINT);
    842     SetViewColor(tint_color(background, B_LIGHTEN_2_TINT));
     841    fBreakpointOptionMarker = tint_color(background, B_DARKEN_1_TINT);
     842    fBackgroundColor = tint_color(background, B_LIGHTEN_2_TINT);
     843    SetViewColor(B_TRANSPARENT_COLOR);
    843844}
    844845
    845846
    SourceView::MarkerView::MaxSize()  
    892893void
    893894SourceView::MarkerView::Draw(BRect updateRect)
    894895{
    895     if (fSourceCode == NULL)
     896    SetLowColor(fBackgroundColor);
     897    if (fSourceCode == NULL) {
     898        FillRect(updateRect, B_SOLID_LOW);
    896899        return;
     900    }
    897901
    898902    // get the lines intersecting with the update rect
    899903    int32 minLine, maxLine;
    SourceView::MarkerView::Draw(BRect updateRect)  
    914918        bool drawBreakpointOptionMarker = true;
    915919
    916920        SourceView::MarkerManager::Marker* marker;
     921        FillRect(LineRect(line), B_SOLID_LOW);
    917922        while ((marker = markers.ItemAt(markerIndex)) != NULL
    918923                && marker->Line() == (uint32)line) {
    919924            marker->Draw(this, LineRect(line));