mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bar becoming wider than window
This commit is contained in:
parent
c3aeb7d931
commit
363d6900aa
@ -22,7 +22,7 @@ class TopBar:
|
|||||||
style += build_rule('#' + self.bar_id + ' a:active', color=get_color('bar-highlight'))
|
style += build_rule('#' + self.bar_id + ' a:active', color=get_color('bar-highlight'))
|
||||||
for bid in self.dummy_bar_id, self.bar_id:
|
for bid in self.dummy_bar_id, self.bar_id:
|
||||||
bar = E.div(
|
bar = E.div(
|
||||||
id=bid, class_='top-bar', style="padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5ex; padding-bottom: 0.5ex",
|
id=bid, class_='top-bar',
|
||||||
E.div(style="display:table-cell;"),
|
E.div(style="display:table-cell;"),
|
||||||
E.div(style="display:table-cell; text-align:right; padding-right: " + self.SPACING)
|
E.div(style="display:table-cell; text-align:right; padding-right: " + self.SPACING)
|
||||||
)
|
)
|
||||||
@ -31,8 +31,10 @@ class TopBar:
|
|||||||
bar.appendChild(E.style(style, type='text/css'))
|
bar.appendChild(E.style(style, type='text/css'))
|
||||||
set_css(bar,
|
set_css(bar,
|
||||||
width='100%', display='table', font_size=get_font_size('title'),
|
width='100%', display='table', font_size=get_font_size('title'),
|
||||||
|
padding_top='0.5ex', padding_bottom='0.5ex',
|
||||||
color=get_color('bar-foreground'), background_color=get_color('bar-background'))
|
color=get_color('bar-foreground'), background_color=get_color('bar-background'))
|
||||||
document.body.appendChild(bar)
|
document.body.appendChild(bar)
|
||||||
|
set_css(bar.firstChild, padding_left='0.5em')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bar(self):
|
def bar(self):
|
||||||
@ -75,7 +77,7 @@ class TopBar:
|
|||||||
for bar in self.bar, self.dummy_bar:
|
for bar in self.bar, self.dummy_bar:
|
||||||
right = bar.firstChild.nextSibling
|
right = bar.firstChild.nextSibling
|
||||||
right.appendChild(E.a(
|
right.appendChild(E.a(
|
||||||
style="overflow: hidden; display:inline-block; vertical-align:text-top; margin-right: " + self.SPACING,
|
style="overflow: hidden; display:inline-block; vertical-align:text-top; margin-left: " + self.SPACING,
|
||||||
href="javascript:void(0)", title=tooltip,
|
href="javascript:void(0)", title=tooltip,
|
||||||
E.i(class_='fa fa-' + icon_name)
|
E.i(class_='fa fa-' + icon_name)
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user