Skip to content
Permalink
Browse files
Merge pull request #9562 from sepalani/dis-icons
Breakpoints: Change icon when disabled
  • Loading branch information
leoetlino committed Mar 7, 2021
2 parents ac687bc + 359a539 commit 6119854
Showing 1 changed file with 13 additions and 3 deletions.
@@ -338,9 +338,19 @@ void CodeViewWidget::Update()

if (PowerPC::debug_interface.IsBreakpoint(addr))
{
bp_item->setData(
Qt::DecorationRole,
Resources::GetScaledThemeIcon("debugger_breakpoint").pixmap(QSize(rowh - 2, rowh - 2)));
auto icon =
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);

0 comments on commit 6119854

Please sign in to comment.