diff options
| author | Léo Lam <leo@leolam.fr> | 2021-03-07 12:14:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-07 12:14:12 +0100 |
| commit | 61198541a0caa324416ba6e34635f71ee82ed362 (patch) | |
| tree | 4b19d1d17e8d1fc22f5fca26f330d770b9826abb /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | |
| parent | ac687bc364ad85ef1ebe2ce2b361e00b498d7812 (diff) | |
| parent | 359a539f25d57c63e74a75e7776b0f036caae25c (diff) | |
Merge pull request #9562 from sepalani/dis-icons
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); |
