diff options
| author | Sepalani <sepalani@hotmail.fr> | 2021-03-04 20:33:08 +0400 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2021-03-05 11:21:37 +0400 |
| commit | 359a539f25d57c63e74a75e7776b0f036caae25c (patch) | |
| tree | 6916fedc2f73e61308891e6aa37e1129ae0cc9be /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | |
| parent | 1e3e5680db145919311d1b46df9f8cf0fe5cab8b (diff) | |
Breakpoints: Change icon when disabled
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 16 |
1 files 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); |
