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.
This commit is contained in:
Rene Gollent
2013-09-17 14:42:07 +02:00
parent 98c5cb2682
commit 89d18e912d
@@ -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;
}