File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ class SocialPluginConfig(Config):
62
62
63
63
# Deprecated options
64
64
cards_color = opt .Deprecated (
65
+ option_type = opt .Type (dict , default = {}),
65
66
message =
66
67
"Deprecated, use 'cards_layout_options.background_color' "
67
68
"and 'cards_layout_options.color' with 'default' layout"
68
- )
69
+ )
69
70
cards_font = opt .Deprecated (
71
+ option_type = opt .Type (str ),
70
72
message = "Deprecated, use 'cards_layout_options.font_family'"
71
73
)
72
74
@@ -138,12 +140,10 @@ def on_config(self, config):
138
140
self .color = colors .get (primary , self .color )
139
141
140
142
# Retrieve color overrides
143
+ options = self .config .cards_layout_options
141
144
self .color = {
142
- ** self .color ,
143
- ** {
144
- "fill" : self .config .cards_layout_options .get ("background_color" ),
145
- "text" : self .config .cards_layout_options .get ("color" )
146
- }
145
+ "fill" : options .get ("background_color" , self .color ["fill" ]),
146
+ "text" : options .get ("color" , self .color ["text" ])
147
147
}
148
148
149
149
# Retrieve custom_dir path
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ class SocialPluginConfig(Config):
62
62
63
63
# Deprecated options
64
64
cards_color = opt .Deprecated (
65
+ option_type = opt .Type (dict , default = {}),
65
66
message =
66
67
"Deprecated, use 'cards_layout_options.background_color' "
67
68
"and 'cards_layout_options.color' with 'default' layout"
68
- )
69
+ )
69
70
cards_font = opt .Deprecated (
71
+ option_type = opt .Type (str ),
70
72
message = "Deprecated, use 'cards_layout_options.font_family'"
71
73
)
72
74
@@ -138,12 +140,10 @@ def on_config(self, config):
138
140
self .color = colors .get (primary , self .color )
139
141
140
142
# Retrieve color overrides
143
+ options = self .config .cards_layout_options
141
144
self .color = {
142
- ** self .color ,
143
- ** {
144
- "fill" : self .config .cards_layout_options .get ("background_color" ),
145
- "text" : self .config .cards_layout_options .get ("color" )
146
- }
145
+ "fill" : options .get ("background_color" , self .color ["fill" ]),
146
+ "text" : options .get ("color" , self .color ["text" ])
147
147
}
148
148
149
149
# Retrieve custom_dir path
You can’t perform that action at this time.
0 commit comments