From ccab2adde6aa15daa9e455983d992362a69d7273 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Nov 2020 21:12:45 +0530 Subject: [PATCH] Fix #1904264 [[Enhancement - Viewer] Show tooltip of the full bookmark name when hovering](https://bugs.launchpad.net/calibre/+bug/1904264) --- src/calibre/gui2/viewer/bookmarks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/viewer/bookmarks.py b/src/calibre/gui2/viewer/bookmarks.py index 8399de2834..ccf5f49c3c 100644 --- a/src/calibre/gui2/viewer/bookmarks.py +++ b/src/calibre/gui2/viewer/bookmarks.py @@ -181,6 +181,7 @@ class BookmarkManager(QWidget): self.bookmarks_list.clear() for bm in bookmarks: i = QListWidgetItem(bm['title']) + i.setData(Qt.ToolTipRole, bm['title']) i.setData(Qt.UserRole, self.bm_to_item(bm)) i.setFlags(i.flags() | Qt.ItemIsEditable) self.bookmarks_list.addItem(i) @@ -242,6 +243,7 @@ class BookmarkManager(QWidget): title = unicode_type(item.data(Qt.DisplayRole)) or _('Unknown') title = self.uniqify_bookmark_title(title) item.setData(Qt.DisplayRole, title) + item.setData(Qt.ToolTipRole, title) bm = item.data(Qt.UserRole) bm['title'] = title bm['timestamp'] = utcnow().isoformat()