From 89d18e912dfef6f0791f586d67b7f91cba30e969 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 17 Sep 2013 12:07:52 +0200 Subject: [PATCH] Debugger: MemoryView - Tweak target address drawing. - Since we actually draw a selection now, change the target address highlight to clearly distinguish it. Rather than inverting it, it's now drawn with a normal background and red text in the hex display. The text mode subcomponent still shows it as an invert though, since the latter doesn't currently indicate the selection. --- .../gui/inspector_window/MemoryView.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp index 7f5111531c..8aaec0a1ff 100644 --- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp +++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp @@ -185,17 +185,14 @@ MemoryView::Draw(BRect rect) const char* blockAddress = currentAddress + (j * blockByteSize); _GetNextHexBlock(buffer, sizeof(buffer), blockAddress); - DrawString(buffer, drawPoint); if (targetAddress >= blockAddress && targetAddress < - blockAddress + blockByteSize) { + blockAddress + blockByteSize) { PushState(); - SetHighColor(B_TRANSPARENT_COLOR); - SetDrawingMode(B_OP_INVERT); - FillRect(BRect(drawPoint.x, drawPoint.y - fh.ascent, - drawPoint.x + (hexBlockSize - 1) * fCharWidth, - drawPoint.y + fh.descent)); + SetHighColor(make_color(216,0,0)); + DrawString(buffer, drawPoint); PopState(); - } + } else + DrawString(buffer, drawPoint); drawPoint.x += fCharWidth * hexBlockSize; }