From 69a5e516ed7f1b737b3a7f6dc012b9c7850118bd Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Fri, 3 Apr 2026 16:18:19 -0700 Subject: BreakpointWidget: Fix drawing of icon when breakpoints are disabled Fix incorrect scaling of the gap drawn inside enabled breakpoints in BreakpointWidget when breakpoints are globally disabled and the font size is changed from the default. As the font size increased the gap would become larger and its center would "migrate" downward and rightward until the gap stopped being visible at all. Additionally, at small font sizes integer truncation issues could result in the gap being offset towards the top left. --- Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp index fbb5c38d9b..06cee537a6 100644 --- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp @@ -306,9 +306,14 @@ void BreakpointWidget::Update() painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(Qt::NoPen); painter.setBrush(Qt::transparent); - // Center and radius - painter.drawEllipse(QPoint(downscale / 2, downscale / 2), downscale / 4, downscale / 4); + + const float icon_radius = static_cast(image.height()) / 2.0f; + const float gap_radius = icon_radius / 2.0f; + const QPointF center(icon_radius, icon_radius); + + painter.drawEllipse(center, gap_radius, gap_radius); painter.end(); + enabled_icon = QPixmap::fromImage(image); } -- cgit v1.2.3