mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use a spinner when fetching more books
This commit is contained in:
parent
9605e8fa2d
commit
5d84cd7913
@ -8,7 +8,7 @@ from gettext import gettext as _
|
||||
from modals import error_dialog
|
||||
|
||||
from book_list.globals import get_session_data
|
||||
from widgets import create_button
|
||||
from widgets import create_button, create_spinner
|
||||
|
||||
THUMBNAIL_MAX_WIDTH = 300
|
||||
THUMBNAIL_MAX_HEIGHT = 400
|
||||
@ -47,7 +47,7 @@ class BooksView:
|
||||
set_css(more.firstChild, display='block', margin_left='auto', margin_right='auto')
|
||||
set_css(more, font_size='1.5rem', padding_top='1.5rem', margin_bottom='1.5rem', width='100%', text_align='center')
|
||||
more.appendChild(E.div(
|
||||
E.i(class_='fa fa-lg fa-cloud-download'), '\xa0' + _('Fetching metadata for more books, please wait') + '…',
|
||||
create_spinner(), '\xa0' + _('Fetching metadata for more books, please wait') + '…',
|
||||
style='margin-left:auto; margin-right:auto; display:none')
|
||||
)
|
||||
self.update_fetching_status()
|
||||
|
@ -26,6 +26,9 @@ create_button.style += build_rule('button.calibre-push-button:active', transform
|
||||
create_button.style += build_rule('button.calibre-push-button:focus', outline='none')
|
||||
create_button.style += build_rule('button.calibre-push-button::-moz-focus-inner', border='0')
|
||||
|
||||
def create_spinner(sz='lg'):
|
||||
return E.i(class_='fa fa-spin fa-spinner fa-' + sz)
|
||||
|
||||
def get_widget_css():
|
||||
ans = create_button.style
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user