mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix #1904264 [[Enhancement - Viewer] Show tooltip of the full bookmark name when hovering](https://bugs.launchpad.net/calibre/+bug/1904264)
This commit is contained in:
parent
d883f97ee6
commit
ccab2adde6
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user