Merge pull request #9562 from sepalani/dis-icons
Breakpoints: Change icon when disabled
This commit is contained in:
commit
61198541a0
|
@ -338,9 +338,19 @@ void CodeViewWidget::Update()
|
||||||
|
|
||||||
if (PowerPC::debug_interface.IsBreakpoint(addr))
|
if (PowerPC::debug_interface.IsBreakpoint(addr))
|
||||||
{
|
{
|
||||||
bp_item->setData(
|
auto icon =
|
||||||
Qt::DecorationRole,
|
Resources::GetScaledThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2));
|
||||||
Resources::GetScaledThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2)));
|
if (!PowerPC::breakpoints.IsBreakPointEnable(addr))
|
||||||
|
{
|
||||||
|
QPixmap disabled_icon(icon.size());
|
||||||
|
disabled_icon.fill(Qt::transparent);
|
||||||
|
QPainter p(&disabled_icon);
|
||||||
|
p.setOpacity(0.20);
|
||||||
|
p.drawPixmap(0, 0, icon);
|
||||||
|
p.end();
|
||||||
|
icon = disabled_icon;
|
||||||
|
}
|
||||||
|
bp_item->setData(Qt::DecorationRole, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
setItem(i, CODE_VIEW_COLUMN_BREAKPOINT, bp_item);
|
setItem(i, CODE_VIEW_COLUMN_BREAKPOINT, bp_item);
|
||||||
|
|
Loading…
Reference in New Issue