From 359a539f25d57c63e74a75e7776b0f036caae25c Mon Sep 17 00:00:00 2001 From: Sepalani Date: Thu, 4 Mar 2021 20:33:08 +0400 Subject: [PATCH] Breakpoints: Change icon when disabled --- .../Core/DolphinQt/Debugger/CodeViewWidget.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp index 203b54450e..54c2e3c0ad 100644 --- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp @@ -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);