Workaround for Firefox bug making download button dark after download. Fixes #1881385 [[Enhancement - Content server] Download button turns dark](https://bugs.launchpad.net/calibre/+bug/1881385)

This commit is contained in:
Kovid Goyal 2020-05-31 21:34:38 +05:30
parent 7fe0ef2363
commit 76111e4805
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -29,11 +29,14 @@ def create_button(text, icon=None, action=None, tooltip=None, highlight=False, d
create_button.style = build_rule('a.calibre-push-button', create_button.style = build_rule('a.calibre-push-button',
border_radius='1em', background_clip='padding-box', background_color=get_color('button-start'), border_radius='1em', background_clip='padding-box', background_color=get_color('button-start'),
background_image='linear-gradient(to bottom, {}, {})'.format(get_color('button-start'), get_color('button-end')), background_image='linear-gradient(to bottom, {}, {})'.format(get_color('button-start'), get_color('button-end')),
padding='0.5ex 1em', color=get_color('button-text'), cursor='pointer', font_size='inherit', display='inline-flex', align_items='center', padding='0.5ex 1em', color=get_color('button-text'), cursor='pointer', font_size='inherit', display='inline-flex',
align_items='center',
box_shadow='0px 2px 1px rgba(50, 50, 50, 0.75)', white_space='nowrap' box_shadow='0px 2px 1px rgba(50, 50, 50, 0.75)', white_space='nowrap'
) )
create_button.style += build_rule('a.calibre-push-button:hover', transform='scale(1.05)') create_button.style += build_rule('a.calibre-push-button:hover', transform='scale(1.05)')
create_button.style += build_rule('a.calibre-push-button:active', transform='scale(1.1)') create_button.style += build_rule('a.calibre-push-button:active', transform='scale(1.1)')
# This is needed because of a bug in Firefox: https://bugs.launchpad.net/bugs/1881385
create_button.style += build_rule('a.calibre-push-button:visited', color=get_color('button-text'))
# }}} # }}}
# Spinner {{{ # Spinner {{{