From 00d574f5642c41e5aaec826fe7a78cb6addd620b Mon Sep 17 00:00:00 2001 From: wangweimin Date: Sun, 7 Nov 2021 21:41:40 +0800 Subject: [PATCH] update theme demo --- demos/theme.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/demos/theme.py b/demos/theme.py index 6a376a16..1d00a2ae 100644 --- a/demos/theme.py +++ b/demos/theme.py @@ -192,11 +192,11 @@ def main(): # PyWebIO application function dict(label=i, value=i, color=i) for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] ], onclick=lambda b: toast(f'Clicked {b} button'), outline=True) - - put_buttons([ - dict(label=i, value=i, color=i) - for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] - ], onclick=lambda b: toast(f'Clicked {b} button'), group=True) + with put_scrollable(border=False, height=None): + put_buttons([ + dict(label=i, value=i, color=i) + for i in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] + ], onclick=lambda b: toast(f'Clicked {b} button'), group=True) ########################################################################################### put_markdown('# Tables') put_markdown(""" @@ -258,13 +258,14 @@ def show_popup(): put_markdown('# Loading') put_processbar('processbar', 0.3) put_text() - put_grid([ - [ - put_loading(shape=shape, color=color) - for color in ('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark') - ] - for shape in ('border', 'grow') - ], cell_width='50px', cell_height='50px') + with put_scrollable(border=False, height=None): + put_grid([ + [ + put_loading(shape=shape, color=color) + for color in ('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark') + ] + for shape in ('border', 'grow') + ], cell_width='50px', cell_height='50px') ########################################################################################### put_markdown('# Tabs') @@ -361,6 +362,7 @@ def page(): The sketchy, minty and yeti theme are from [bootswatch](https://bootswatch.com/4/). """, lstrip=True) + set_env(input_panel_min_height=100, input_panel_init_height=190) output_widgets() pin_widgets() form()