From a585e507cbe2c05cc846013cafe433953e514295 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 31 May 2020 14:10:56 +0200 Subject: Open menu at the bottom right of the cursor --- src/gui/tags/panel/table/menu.py | 4 ++-- src/gui/tasks/table/menu.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/tags/panel/table/menu.py b/src/gui/tags/panel/table/menu.py index f95c097..2238444 100644 --- a/src/gui/tags/panel/table/menu.py +++ b/src/gui/tags/panel/table/menu.py @@ -1,4 +1,4 @@ -from PyQt5 import QtWidgets +from PyQt5 import QtWidgets, QtCore import db.tags import gui.tags.panel.dialog @@ -16,7 +16,7 @@ def open(table, update_tag_signal, position): delete_action = menu.addAction(gui.icon.trash(menu.style()), 'delete') - action = menu.exec_(table.mapToGlobal(position)) + action = menu.exec_(table.mapToGlobal(position + QtCore.QPoint(15, 20))) if action == modify_action and len(rows) == 1: row = list(rows)[0] tag = table.model().get_at(row) diff --git a/src/gui/tasks/table/menu.py b/src/gui/tasks/table/menu.py index f22176c..5404d6c 100644 --- a/src/gui/tasks/table/menu.py +++ b/src/gui/tasks/table/menu.py @@ -1,4 +1,4 @@ -from PyQt5 import QtWidgets +from PyQt5 import QtWidgets, QtCore from typing import List import db.tasks @@ -18,7 +18,7 @@ def open(table, update_task_signal, position): delete_action = menu.addAction(gui.icon.trash(menu.style()), 'delete') - action = menu.exec_(table.mapToGlobal(position)) + action = menu.exec_(table.mapToGlobal(position + QtCore.QPoint(15, 20))) if action == modify_action and len(rows) == 1: row = list(rows)[0] (task, tags) = table.get_at(row) -- cgit v1.2.3