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 12:07:52 +02:00
parent 4ce4250be0
commit 5ad39153e3

View File

@ -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;
}