[haiku-commits] haiku: hrev45773 - src/apps/debugger/user_interface/gui/team_window

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 20 Jun 2013 00:42:03 +0200 (CEST)

hrev45773 adds 1 changeset to branch 'master'
old head: 343751a96c43a0c3074d6f1d5526ff3ae80fb267
new head: 77d2c53ce721cd15192af6baa9830a60ee39bae2
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=77d2c53+%5E343751a

----------------------------------------------------------------------------

77d2c53: Slight tweak to instruction pointer highlight drawing.
  
  - When highlighting lines that match IPs in the current stack trace,
  draw those which aren't from the currently selected frame in a lighter
  color, so as to make it more clear which is which when multiple calls
  are visible at once.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45773
Commit:      77d2c53ce721cd15192af6baa9830a60ee39bae2
URL:         http://cgit.haiku-os.org/haiku/commit/?id=77d2c53
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Wed Jun 19 22:38:20 2013 UTC

----------------------------------------------------------------------------

1 file changed, 13 insertions(+), 3 deletions(-)
.../user_interface/gui/team_window/SourceView.cpp    | 16 +++++++++++++---

----------------------------------------------------------------------------

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 e88c9f8..2a631d8 100644
--- a/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
+++ b/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
@@ -206,6 +206,8 @@ struct SourceView::MarkerManager::InstructionPointerMarker 
: Marker {
 
        virtual void                            Draw(BView* view, BRect rect);
 
+                       bool                            IsCurrentIP() const { 
return fIsCurrentIP; }
+
 private:
                        void                            _DrawArrow(BView* view, 
BPoint tip, BSize size,
                                                                        BSize 
base, const rgb_color& color,
@@ -1095,6 +1097,7 @@ SourceView::TextView::Draw(BRect updateRect)
        SetHighColor(fTextColor);
        SetFont(&fFontInfo->font);
        SourceView::MarkerManager::Marker* marker;
+       SourceView::MarkerManager::InstructionPointerMarker* ipMarker;
        int32 markerIndex = 0;
        for (int32 i = minLine; i <= maxLine; i++) {
                SetLowColor(ViewColor());
@@ -1109,9 +1112,16 @@ SourceView::TextView::Draw(BRect updateRect)
                                continue;
                         } else if (marker->Line() == (uint32)i) {
                                ++markerIndex;
-                               if (dynamic_cast<SourceView::MarkerManager
-                                       ::InstructionPointerMarker*>(marker) != 
NULL)
-                                       SetLowColor(96, 216, 216, 255);
+                                ipMarker = 
dynamic_cast<SourceView::MarkerManager
+                                       ::InstructionPointerMarker*>(marker);
+                               if (ipMarker != NULL) {
+                                       rgb_color ipColor = {96, 216, 216, 255 
};
+                                       if (!ipMarker->IsCurrentIP())
+                                               ipColor = tint_color(ipColor, 
B_LIGHTEN_2_TINT);
+
+                                       SetLowColor(ipColor);
+
+                               }
                                else
                                        SetLowColor(255, 255, 0, 255);
                                FillRect(BRect(kLeftTextMargin, y, 
Bounds().right,


Other related posts:

  • » [haiku-commits] haiku: hrev45773 - src/apps/debugger/user_interface/gui/team_window - anevilyak