mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the home icon in the breadcrumbs slightly larger
Also remove unnecessary use of prototype
This commit is contained in:
parent
7a50cbf7cf
commit
98ae9e6754
@ -210,7 +210,7 @@ class SearchPanel:
|
||||
if item:
|
||||
li.appendChild(E.span(item.name))
|
||||
else:
|
||||
li.appendChild(svgicon('home'))
|
||||
li.appendChild(svgicon('home', '2.2ex', '2.2ex'))
|
||||
|
||||
create_breadcrumb()
|
||||
parent = self.tag_browser_data
|
||||
|
@ -67,9 +67,9 @@ def create_keyframes(animation_name, *frames):
|
||||
ans.push('}')
|
||||
return ans.join('\n') + '\n'
|
||||
|
||||
def svgicon(name):
|
||||
def svgicon(name, height, width):
|
||||
ans = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
|
||||
ans.setAttribute('style', 'fill: currentColor; height: 2ex; width: 2ex; vertical-align: text-top')
|
||||
ans.setAttribute('style', 'fill: currentColor; height: {}; width: {}; vertical-align: text-top'.format(height ? '2ex', width ? '2ex'))
|
||||
u = document.createElementNS('http://www.w3.org/2000/svg', 'use')
|
||||
u.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#icon-' + name)
|
||||
ans.appendChild(u)
|
||||
|
@ -35,7 +35,7 @@ def parse_url_params(url=None, allow_multiple=False):
|
||||
key, val = pair.partition('=')[::2]
|
||||
key, val = decodeURIComponent(key), decodeURIComponent(val)
|
||||
if allow_multiple:
|
||||
if not Object.prototype.hasOwnProperty.call(ans, key):
|
||||
if ans[key] is undefined:
|
||||
ans[key] = []
|
||||
ans[key].append(val)
|
||||
else:
|
||||
|
@ -95,5 +95,5 @@ def get_widget_css():
|
||||
ans = 'a, button:focus { outline: none }; a, button::-moz-focus-inner { border: 0 }\n'
|
||||
ans += create_button.style
|
||||
ans += create_spinner.style
|
||||
ans += Breadcrumbs.prototype.STYLE_RULES
|
||||
ans += Breadcrumbs.STYLE_RULES
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user