mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
fix(code): respect user-defined fill_color for container background
Previously, user-defined background `fill_color` was accidentally overridden by the default fallback color. This fix ensures that the custom value is preserved, passing the related test assertions.
This commit is contained in:
parent
f9079e3619
commit
dd6c87b94f
1 changed files with 1 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ from manim.mobject.geometry.shape_matchers import SurroundingRectangle
|
|||
from manim.mobject.opengl.opengl_compatibility import ConvertToOpenGL
|
||||
from manim.mobject.types.vectorized_mobject import VGroup, VMobject
|
||||
from manim.typing import StrPath
|
||||
from manim.utils.color import BLACK, GRAY, WHITE, ManimColor
|
||||
from manim.utils.color import BLACK, GRAY, WHITE
|
||||
|
||||
|
||||
class Code(VMobject, metaclass=ConvertToOpenGL):
|
||||
|
|
@ -251,8 +251,6 @@ class Code(VMobject, metaclass=ConvertToOpenGL):
|
|||
if background_config_base["fill_color"] is None:
|
||||
background_color: str = selected_style.background_color
|
||||
background_config_base.update({"fill_color": background_color})
|
||||
else:
|
||||
background_config_base.update({"fill_color": ManimColor("#222")})
|
||||
|
||||
if background == "rectangle":
|
||||
self.background = SurroundingRectangle(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue