Edit Book: Proper icon for the split file action. Fixes #1637989 [Incorrect icon in edit book and edit metadata](https://bugs.launchpad.net/calibre/+bug/1637989)

This commit is contained in:
Kovid Goyal 2016-10-31 18:09:26 +05:30
parent 308846a79a
commit 211b65aad4
5 changed files with 156 additions and 4 deletions

152
imgsrc/document-split.svg Normal file
View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="128"
height="128"
viewBox="0 0 128 128"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="document-split.svg">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4141"
id="linearGradient4147"
x1="64.402176"
y1="1023.1872"
x2="63.597828"
y2="953.27203"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.3265309,0,0,-0.3265309,43.102023,1283.843)" />
<linearGradient
inkscape:collect="always"
id="linearGradient4141">
<stop
style="stop-color:#016324;stop-opacity:1"
offset="0"
id="stop4143" />
<stop
style="stop-color:#16fb67;stop-opacity:1"
offset="1"
id="stop4145" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4141"
id="linearGradient4157"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.3265309,0,0,0.3265309,43.102023,691.95274)"
x1="64.402176"
y1="1023.1872"
x2="63.597828"
y2="953.27203" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="50.5602"
inkscape:cy="69.707741"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="3840"
inkscape:window-height="2128"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:creator>
<cc:Agent>
<dc:title>Kovid Goyal</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:publisher>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-924.36216)">
<path
id="path6"
overflow="visible"
display="inline"
visibility="visible"
style="color:#000000;text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;display:inline;overflow:visible;visibility:visible;fill:#3027dd;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate"
d="m 22.181976,924.64788 c -2.716253,0.0137 -4.199861,2.31457 -4.18181,4.1087 l 0,53.22899 c 2.23e-4,2.1513 1.992284,4.1085 4.18181,4.1087 l 83.636194,0 c 2.18953,-2e-4 4.18159,-1.9574 4.18181,-4.1087 l 0,-31.31595 c 0.003,-1.07662 -0.44623,-2.14762 -1.21969,-2.91033 L 86.477307,925.84625 c -0.77621,-0.75997 -1.86633,-1.20097 -2.96212,-1.19837 z m 4.18181,8.21739 52.969595,0 0,17.80435 c 2.34e-4,2.26907 1.872355,4.10846 4.181806,4.10869 l 18.121173,0 0,23.09856 -75.272574,0 z m 61.333211,5.77792 8.0587,7.91773 -8.0587,0 z"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccccccccccccc" />
<path
sodipodi:nodetypes="cccccccccccccc"
inkscape:connector-curvature="0"
d="m 22.18198,990.27288 c -2.716253,0.0137 -4.199861,2.31457 -4.18181,4.1087 l 0,53.22902 c 2.23e-4,2.1513 1.992284,4.1085 4.18181,4.1087 l 83.6362,0 c 2.18953,-2e-4 4.18159,-1.9574 4.18181,-4.1087 l -0.21907,-53.19292 c -0.005,-1.88755 -0.90332,-4.04296 -3.14069,-4.05551 z m 4.18181,8.21739 74.66602,0 0.60656,45.01163 -75.27258,0 z"
style="color:#000000;text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;display:inline;overflow:visible;visibility:visible;fill:#3027dd;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;enable-background:accumulate"
visibility="visible"
display="inline"
overflow="visible"
id="path4139" />
<path
inkscape:connector-curvature="0"
d="m 84.244916,970.00105 q 0,-1.03174 -0.751276,-1.7857 L 65.779338,950.43753 Q 65.028063,949.68357 64,949.68357 q -1.028062,0 -1.779338,0.75396 L 44.50636,968.21535 q -0.751276,0.75396 -0.751276,1.7857 0,1.03177 0.751276,1.7857 0.751277,0.75399 1.779339,0.75399 l 35.428602,0 q 1.028063,0 1.779339,-0.75399 0.751275,-0.75393 0.751275,-1.7857 z"
id="path4"
style="fill:url(#linearGradient4147);fill-opacity:1" />
<path
style="fill:url(#linearGradient4157);fill-opacity:1"
id="path4155"
d="m 84.244916,1005.7947 q 0,1.0317 -0.751276,1.7857 l -17.714302,17.7778 q -0.751275,0.754 -1.779338,0.754 -1.028062,0 -1.779338,-0.754 L 44.50636,1007.5804 q -0.751276,-0.754 -0.751276,-1.7857 0,-1.0318 0.751276,-1.7857 0.751277,-0.754 1.779339,-0.754 l 35.428602,0 q 1.028063,0 1.779339,0.754 0.751275,0.7539 0.751275,1.7857 z"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -110,7 +110,7 @@ class EditorWidget(QWebView): # {{{
_('Align justified'), False), _('Align justified'), False),
('Undo', 'undo', 'edit-undo', _('Undo'), False), ('Undo', 'undo', 'edit-undo', _('Undo'), False),
('Redo', 'redo', 'edit-redo', _('Redo'), False), ('Redo', 'redo', 'edit-redo', _('Redo'), False),
('RemoveFormat', 'remove_format', 'trash', _('Remove formatting'), False), ('RemoveFormat', 'remove_format', 'edit-clear', _('Remove formatting'), False),
('Copy', 'copy', 'edit-copy', _('Copy'), False), ('Copy', 'copy', 'edit-copy', _('Copy'), False),
('Paste', 'paste', 'edit-paste', _('Paste'), False), ('Paste', 'paste', 'edit-paste', _('Paste'), False),
('Cut', 'cut', 'edit-cut', _('Cut'), False), ('Cut', 'cut', 'edit-cut', _('Cut'), False),
@ -166,7 +166,7 @@ class EditorWidget(QWebView): # {{{
self.action_insert_link.triggered.connect(self.insert_link) self.action_insert_link.triggered.connect(self.insert_link)
self.pageAction(QWebPage.ToggleBold).changed.connect(self.update_link_action) self.pageAction(QWebPage.ToggleBold).changed.connect(self.update_link_action)
self.action_insert_link.setEnabled(False) self.action_insert_link.setEnabled(False)
self.action_clear = QAction(QIcon(I('edit-clear.png')), _('Clear'), self) self.action_clear = QAction(QIcon(I('trash.png')), _('Clear'), self)
self.action_clear.triggered.connect(self.clear_text) self.action_clear.triggered.connect(self.clear_text)
self.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks) self.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)

View File

@ -223,7 +223,7 @@ class ManageFonts(Dialog):
s.addWidget(fv), s.addWidget(c) s.addWidget(fv), s.addWidget(c)
self.cb = b = QPushButton(_('&Change selected fonts')) self.cb = b = QPushButton(_('&Change selected fonts'))
b.setIcon(QIcon(I('auto_author_sort.png'))) b.setIcon(QIcon(I('wizard.png')))
b.clicked.connect(self.change_fonts) b.clicked.connect(self.change_fonts)
l.addWidget(b) l.addWidget(b)
self.rb = b = QPushButton(_('&Remove selected fonts')) self.rb = b = QPushButton(_('&Remove selected fonts'))

View File

@ -430,7 +430,7 @@ class Main(MainWindow):
self.action_auto_sync_preview = reg('sync-right.png', _('Sync preview position to editor position'), None, 'sync-preview-to-editor', (), _( self.action_auto_sync_preview = reg('sync-right.png', _('Sync preview position to editor position'), None, 'sync-preview-to-editor', (), _(
'Sync preview position to editor position')) 'Sync preview position to editor position'))
self.action_reload_preview = reg('view-refresh.png', _('Refresh preview'), None, 'reload-preview', ('F5',), _('Refresh preview')) self.action_reload_preview = reg('view-refresh.png', _('Refresh preview'), None, 'reload-preview', ('F5',), _('Refresh preview'))
self.action_split_in_preview = reg('auto_author_sort.png', _('Split this file'), None, 'split-in-preview', (), _( self.action_split_in_preview = reg('document-split.png', _('Split this file'), None, 'split-in-preview', (), _(
'Split file in the preview panel')) 'Split file in the preview panel'))
self.action_find_next_preview = reg('arrow-down.png', _('Find Next'), None, 'find-next-preview', (), _('Find next in preview')) self.action_find_next_preview = reg('arrow-down.png', _('Find Next'), None, 'find-next-preview', (), _('Find next in preview'))
self.action_find_prev_preview = reg('arrow-up.png', _('Find Previous'), None, 'find-prev-preview', (), _('Find previous in preview')) self.action_find_prev_preview = reg('arrow-up.png', _('Find Previous'), None, 'find-prev-preview', (), _('Find previous in preview'))