@@ -41,11 +41,20 @@ def auto_size_to_col(size):
4141 "flow" : None ,
4242}
4343
44- TYPE_COLOR = {
45- "s" : "success" ,
46- "i" : "info" ,
47- "m" : "warning" ,
48- }
44+ TYPE_COLORS = [
45+ "success" ,
46+ "info" ,
47+ "warning" ,
48+ "error" ,
49+ "purple" ,
50+ "cyan" ,
51+ "teal" ,
52+ "indigo" ,
53+ "pink" ,
54+ "amber" ,
55+ "lime" ,
56+ "deep-purple" ,
57+ ]
4958
5059
5160def lut_name (element ):
@@ -425,8 +434,7 @@ def build_auto_layout(self, variables=None):
425434 with DivLayout (self .server , template_name = "auto_layout" ) as self .ui :
426435 if self .state .layout_grouped :
427436 with v3 .VCol (classes = "pa-1" ):
428- for var_type in variables .keys ():
429-
437+ for idx , var_type in enumerate (variables .keys ()):
430438 var_names = variables [var_type ]
431439 total_size = len (var_names )
432440
@@ -437,7 +445,7 @@ def build_auto_layout(self, variables=None):
437445 border = "start" ,
438446 classes = "pr-1 py-1 pl-3 mb-1" ,
439447 variant = "flat" ,
440- border_color = TYPE_COLOR . get ( var_type , "primary" ) ,
448+ border_color = TYPE_COLORS [ idx % len ( TYPE_COLORS )] ,
441449 ):
442450 with v3 .VRow (dense = True ):
443451 for name in var_names :
@@ -468,7 +476,7 @@ def build_auto_layout(self, variables=None):
468476 else :
469477 all_names = [name for names in variables .values () for name in names ]
470478 with v3 .VRow (dense = True , classes = "pa-2" ):
471- for var_type in "smi" :
479+ for var_type in variables . keys () :
472480 var_names = variables [var_type ]
473481 for name in var_names :
474482 view = self .get_view (name , var_type )
@@ -504,7 +512,7 @@ def build_auto_layout(self, variables=None):
504512 existed_order = set ()
505513 order_max = 0
506514 orders_to_update = []
507- for var_type in "smi" :
515+ for var_type in variables . keys () :
508516 var_names = variables [var_type ]
509517 for name in var_names :
510518 config = self .get_view (name , var_type ).config
0 commit comments