mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show line number of tag in live css panel
This commit is contained in:
parent
c9e7fe2546
commit
1f480dd3b8
Binary file not shown.
@ -336,7 +336,7 @@ class PreviewIntegration
|
||||
while target and target.ownerDocument
|
||||
css = get_matched_css(target, is_ancestor, all_properties)
|
||||
if css.length > 0
|
||||
ans['nodes'].push({'name':target.tagName?.toLowerCase(), 'css':css, 'is_ancestor':is_ancestor})
|
||||
ans['nodes'].push({'name':target.tagName?.toLowerCase(), 'css':css, 'is_ancestor':is_ancestor, 'sourceline':target.getAttribute('data-lnum')})
|
||||
target = target.parentNode
|
||||
is_ancestor = true
|
||||
return JSON.stringify(ans)
|
||||
|
@ -227,7 +227,7 @@ class Box(QWidget):
|
||||
w.deleteLater()
|
||||
self.widgets = []
|
||||
for node in data['nodes']:
|
||||
node_name = node['name']
|
||||
node_name = node['name'] + ' @%s' % node['sourceline']
|
||||
if node['is_ancestor']:
|
||||
title = _('Inherited from %s') % node_name
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user