@@ -192,11 +192,11 @@ def main(): # PyWebIO application function
192
192
dict (label = i , value = i , color = i )
193
193
for i in ['primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'light' , 'dark' ]
194
194
], onclick = lambda b : toast (f'Clicked { b } button' ), outline = True )
195
-
196
- put_buttons ([
197
- dict (label = i , value = i , color = i )
198
- for i in ['primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'light' , 'dark' ]
199
- ], onclick = lambda b : toast (f'Clicked { b } button' ), group = True )
195
+ with put_scrollable ( border = False , height = None ):
196
+ put_buttons ([
197
+ dict (label = i , value = i , color = i )
198
+ for i in ['primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'light' , 'dark' ]
199
+ ], onclick = lambda b : toast (f'Clicked { b } button' ), group = True )
200
200
###########################################################################################
201
201
put_markdown ('# Tables' )
202
202
put_markdown ("""
@@ -258,13 +258,14 @@ def show_popup():
258
258
put_markdown ('# Loading' )
259
259
put_processbar ('processbar' , 0.3 )
260
260
put_text ()
261
- put_grid ([
262
- [
263
- put_loading (shape = shape , color = color )
264
- for color in ('primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'light' , 'dark' )
265
- ]
266
- for shape in ('border' , 'grow' )
267
- ], cell_width = '50px' , cell_height = '50px' )
261
+ with put_scrollable (border = False , height = None ):
262
+ put_grid ([
263
+ [
264
+ put_loading (shape = shape , color = color )
265
+ for color in ('primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'light' , 'dark' )
266
+ ]
267
+ for shape in ('border' , 'grow' )
268
+ ], cell_width = '50px' , cell_height = '50px' )
268
269
###########################################################################################
269
270
put_markdown ('# Tabs' )
270
271
@@ -345,22 +346,25 @@ def page():
345
346
</div>
346
347
""" )
347
348
348
- put_markdown ('# Switch Themes' )
349
- put_table (
350
- [
351
- [
352
- put_image (f"https://cdn.jsdelivr.net/gh/wang0618/PyWebIO@dev/docs/assets/theme/{ name } .png" ).onclick (
353
- partial (go_app , name = name , new_window = False ))
354
- for name in ALL_THEME if name != theme ],
355
- ]
356
- )
349
+ put_markdown ('# Switch Theme' )
350
+ themes = [
351
+ put_image (f"https://cdn.jsdelivr.net/gh/wang0618/PyWebIO@dev/docs/assets/theme/{ name } .png" ).onclick (
352
+ partial (go_app , name = name , new_window = False ))
353
+ for name in ALL_THEME if name != theme
354
+ ]
355
+ if info .user_agent .is_mobile :
356
+ put_table ([themes [:2 ], themes [2 :]])
357
+ else :
358
+ put_table ([themes ])
359
+
357
360
put_markdown ("""
358
361
### Credits
359
362
360
363
The dark theme is modified from ForEvolve's [bootstrap-dark](https://github.com/ForEvolve/bootstrap-dark).
361
364
The sketchy, minty and yeti theme are from [bootswatch](https://bootswatch.com/4/).
362
365
""" , lstrip = True )
363
366
367
+ set_env (input_panel_min_height = 100 , input_panel_init_height = 190 )
364
368
output_widgets ()
365
369
pin_widgets ()
366
370
form ()
0 commit comments