GUI: trace+selection color in graph
This commit is contained in:
parent
fae00eaaa9
commit
94d3771f7f
|
@ -183,14 +183,19 @@ void DisassemblerGraphView::paintNormal(QPainter & p, QRect & viewportRect, int
|
||||||
int y = block.y + (2 * this->charWidth) + (int(block.block.header_text.lines.size()) * this->charHeight);
|
int y = block.y + (2 * this->charWidth) + (int(block.block.header_text.lines.size()) * this->charHeight);
|
||||||
for(Instr & instr : block.block.instrs)
|
for(Instr & instr : block.block.instrs)
|
||||||
{
|
{
|
||||||
if(instr.addr == this->cur_instr)
|
auto selected = instr.addr == this->cur_instr;
|
||||||
|
auto traced = dbgfunctions->GetTraceRecordHitCount(instr.addr) != 0;
|
||||||
|
if(selected && traced)
|
||||||
{
|
{
|
||||||
p.setPen(QColor(0, 0, 0, 0));
|
p.fillRect(QRect(block.x + this->charWidth + 3, y, block.width - (10 + 2 * this->charWidth),
|
||||||
p.setBrush(disassemblySelectionColor);
|
int(instr.text.lines.size()) * this->charHeight), disassemblyTracedSelectionColor);
|
||||||
p.drawRect(block.x + this->charWidth + 3, y, block.width - (10 + 2 * this->charWidth),
|
|
||||||
int(instr.text.lines.size()) * this->charHeight);
|
|
||||||
}
|
}
|
||||||
else if(dbgfunctions->GetTraceRecordHitCount(instr.addr) != 0)
|
else if(selected)
|
||||||
|
{
|
||||||
|
p.fillRect(QRect(block.x + this->charWidth + 3, y, block.width - (10 + 2 * this->charWidth),
|
||||||
|
int(instr.text.lines.size()) * this->charHeight), disassemblySelectionColor);
|
||||||
|
}
|
||||||
|
else if(traced)
|
||||||
{
|
{
|
||||||
p.fillRect(QRect(block.x + this->charWidth + 3, y, block.width - (10 + 2 * this->charWidth),
|
p.fillRect(QRect(block.x + this->charWidth + 3, y, block.width - (10 + 2 * this->charWidth),
|
||||||
int(instr.text.lines.size()) * this->charHeight), disassemblyTracedColor);
|
int(instr.text.lines.size()) * this->charHeight), disassemblyTracedColor);
|
||||||
|
@ -1348,6 +1353,8 @@ void DisassemblerGraphView::colorsUpdatedSlot()
|
||||||
disassemblyBackgroundColor = ConfigColor("DisassemblyBackgroundColor");
|
disassemblyBackgroundColor = ConfigColor("DisassemblyBackgroundColor");
|
||||||
disassemblySelectionColor = ConfigColor("DisassemblySelectionColor");
|
disassemblySelectionColor = ConfigColor("DisassemblySelectionColor");
|
||||||
disassemblyTracedColor = ConfigColor("DisassemblyTracedBackgroundColor");
|
disassemblyTracedColor = ConfigColor("DisassemblyTracedBackgroundColor");
|
||||||
|
auto a = disassemblySelectionColor, b = disassemblyTracedColor;
|
||||||
|
disassemblyTracedSelectionColor = QColor((a.red() + b.red()) / 2, (a.green() + b.green()) / 2, (a.blue() + b.blue()) / 2);
|
||||||
|
|
||||||
jmpColor = ConfigColor("GraphJmpColor");
|
jmpColor = ConfigColor("GraphJmpColor");
|
||||||
brtrueColor = ConfigColor("GraphBrtrueColor");
|
brtrueColor = ConfigColor("GraphBrtrueColor");
|
||||||
|
|
|
@ -296,6 +296,7 @@ private:
|
||||||
QColor disassemblyBackgroundColor;
|
QColor disassemblyBackgroundColor;
|
||||||
QColor disassemblySelectionColor;
|
QColor disassemblySelectionColor;
|
||||||
QColor disassemblyTracedColor;
|
QColor disassemblyTracedColor;
|
||||||
|
QColor disassemblyTracedSelectionColor;
|
||||||
QColor jmpColor;
|
QColor jmpColor;
|
||||||
QColor brtrueColor;
|
QColor brtrueColor;
|
||||||
QColor brfalseColor;
|
QColor brfalseColor;
|
||||||
|
|
Loading…
Reference in New Issue