From e2c4dfea4edca9a1d34007fcd4737edf3bc7e649 Mon Sep 17 00:00:00 2001 From: oop7 <110548351+oop7@users.noreply.github.com> Date: Wed, 21 Jan 2026 18:10:34 +0200 Subject: [PATCH] Increase menu button area in history delegate Expanded the clickable area for the menu button in HistoryDelegate to 60x50px and adjusted text width accordingly. This improves usability and addresses issues with the left side of the button not responding to clicks. --- .../ytsage_gui_dialogs/ytsage_dialogs_history.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gui/ytsage_gui_dialogs/ytsage_dialogs_history.py b/src/gui/ytsage_gui_dialogs/ytsage_dialogs_history.py index 58308db..5227656 100644 --- a/src/gui/ytsage_gui_dialogs/ytsage_dialogs_history.py +++ b/src/gui/ytsage_gui_dialogs/ytsage_dialogs_history.py @@ -228,7 +228,7 @@ class HistoryDelegate(QStyledItemDelegate): # Text Area text_x = thumb_rect.right() + 12 - text_width = card_rect.right() - text_x - 50 + text_width = card_rect.right() - text_x - 85 # Leave even more space for the larger 60px button # Title title_rect = QRect(text_x, thumb_rect.top(), text_width, 50) @@ -305,7 +305,18 @@ class HistoryDelegate(QStyledItemDelegate): painter.restore() def get_menu_rect(self, card_rect): - return QRect(card_rect.right() - 40, card_rect.top() + 10, 30, 30) + # Widen the clickable area significantly (60x50) and shift slightly left + # to fix "left side not working" issues. + w = 60 + h = 50 + margin_right = 5 + margin_top = 5 + return QRect( + card_rect.right() - w - margin_right, + card_rect.top() + margin_top, + w, + h + ) def editorEvent(self, event, model, option, index): """Handle mouse clicks."""