Added animated loading box.
This commit is contained in:
@@ -83,7 +83,6 @@ class BaseViewer(object):
|
||||
self.nav = Navigator(self.content.get, **kwargs)
|
||||
|
||||
self._subwindows = None
|
||||
self.add_loading()
|
||||
|
||||
def draw(self):
|
||||
raise NotImplementedError
|
||||
@@ -107,20 +106,6 @@ class BaseViewer(object):
|
||||
continue
|
||||
self.stdscr.nodelay(0)
|
||||
|
||||
def add_loading(self):
|
||||
"Draw a `loading` popup dialog in the center of the screen"
|
||||
|
||||
message = 'Loading...'
|
||||
|
||||
n_rows, n_cols = self.stdscr.getmaxyx()
|
||||
win_rows, win_cols = 3, len(message)+2
|
||||
start_row = (n_rows - win_rows) / 2
|
||||
start_col = (n_cols - win_cols) / 2
|
||||
window = self.stdscr.derwin(win_rows, win_cols, start_row, start_col)
|
||||
window.border()
|
||||
window.addstr(1, 1, message)
|
||||
window.refresh()
|
||||
|
||||
def draw_header(self):
|
||||
|
||||
n_rows, n_cols = self._header_window.getmaxyx()
|
||||
|
||||
Reference in New Issue
Block a user