fix(md_renderer_py): use Style.color_(Col_.X) API for imgui-bundle 1.92.5
The imgui-bundle 1.92.5 API changed: OLD: imgui.get_style().colors[imgui.Col_.text] NEW: imgui.get_style().color_(imgui.Col_.text) The Style object no longer has a 'colors' dict; it has a 'color_' method that takes a Col_ enum and returns the ImVec4 color. Updated all 9 call sites in md_renderer_py.py and the test mocks in test_md_renderer_py.py, test_markdown_helper_bullets.py, and test_markdown_render_robust.py. 42/42 tests pass.
This commit is contained in:
@@ -28,7 +28,7 @@ def _mock_imgui(mock_imgui):
|
||||
mock_imgui.pop_font = MagicMock()
|
||||
mock_imgui.small_button = MagicMock()
|
||||
mock_imgui.get_style = MagicMock(return_value=MagicMock(
|
||||
colors={i: MagicMock(x=1, y=1, z=1, w=1) for i in range(6)}
|
||||
color_=MagicMock(side_effect=lambda col: MagicMock(x=1, y=1, z=1, w=1))
|
||||
))
|
||||
mock_imgui.get_io = MagicMock(return_value=MagicMock(fonts=MagicMock(fonts=[None])))
|
||||
mock_imgui.calc_text_size = MagicMock(return_value=MagicMock(x=50, y=20))
|
||||
|
||||
Reference in New Issue
Block a user