Icon for highlights

This commit is contained in:
Kovid Goyal 2020-06-26 16:50:30 +05:30
parent 655c9c950c
commit 74897b4ec2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
5 changed files with 63 additions and 1 deletions

60
imgsrc/highlight.svg Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="highlight.svg"
id="svg4"
version="1.1"
viewBox="0 0 544 512">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
inkscape:current-layer="svg4"
inkscape:window-maximized="0"
inkscape:window-y="40"
inkscape:window-x="0"
inkscape:cy="256"
inkscape:cx="120.38095"
inkscape:zoom="1.96875"
showgrid="false"
id="namedview6"
inkscape:window-height="1400"
inkscape:window-width="2560"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<path
style="fill:#2caf45;fill-opacity:1"
id="path839"
d="m 527.92,79.27 -63.2,-63.2 C 444.23,-4.42 411.34,-5.45 389.6,13.72 L 190.55,183.68 360.32,353.46 530.27,154.4 c 19.18,-21.74 18.15,-54.63 -2.35,-75.13 z" />
<path
style="fill:#2271d5;fill-opacity:1"
id="path837"
d="m 124.61,239.97 a 36.592,36.592 0 0 0 -10.79,38.1 l 13.05,42.83 -50.93,50.94 96.23,96.23 50.86,-50.86 42.74,13.08 c 13.73,4.2 28.65,-0.01 38.15,-10.78 L 339.47,377.87 166.13,204.53 Z" />
<path
style="fill:#ea8404;fill-opacity:1"
id="path2"
d="M 0,479.98 99.92,512 135.37,476.55 68.33,409.51 Z" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

1
imgsrc/srv/highlight.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 544 512"><path d="M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z"></path></svg>

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -12,7 +12,7 @@ from calibre.gui2.actions import InterfaceAction
class BrowseAnnotationsAction(InterfaceAction):
name = 'Browse Annotations'
action_spec = (_('Browse annotations'), 'polish.png',
action_spec = (_('Browse annotations'), 'highlight.png',
_('Browse highlights and bookmarks from all books in the library'), _('B'))
dont_add_to = frozenset(('context-menu-device',))
action_type = 'current'

View File

@ -410,6 +410,7 @@ class AnnotationsBrowser(Dialog):
def __init__(self, parent=None):
Dialog.__init__(self, _('Annotations browser'), 'library-annotations-browser-1', parent=parent)
self.setAttribute(Qt.WA_DeleteOnClose, False)
self.setWindowIcon(QIcon(I('highlight.png')))
def do_open_annotation(self, book_id, fmt, annot):
atype = annot['type']