diff --git a/bindings/imgui_bundle/demos_cpp/demo_utils/demo_app_table.cpp b/bindings/imgui_bundle/demos_cpp/demo_utils/demo_app_table.cpp index 6bce7efe..ae8dd10f 100644 --- a/bindings/imgui_bundle/demos_cpp/demo_utils/demo_app_table.cpp +++ b/bindings/imgui_bundle/demos_cpp/demo_utils/demo_app_table.cpp @@ -78,7 +78,7 @@ void DisplayDemoAppTableWithScrollButtons( // Scroll buttons scrollDelta = ImGui::GetItemRectSize().y - HelloImGui::EmSize(0.5f); ImGui::NewLine(); - ImGui::SameLine(ImGui::GetWindowWidth() - HelloImGui::EmSize(4.f)); + ImGui::SameLine(ImGui::GetItemRectSize().x - HelloImGui::EmSize(3.f)); ImGui::BeginDisabled(scrollCurrent == 0.f); if (ImGui::ArrowButton("##up", ImGuiDir_Up)) shallScrollUp = true; diff --git a/bindings/imgui_bundle/demos_python/demo_utils/demo_app_table.py b/bindings/imgui_bundle/demos_python/demo_utils/demo_app_table.py index 7a113e1d..5489cd30 100644 --- a/bindings/imgui_bundle/demos_python/demo_utils/demo_app_table.py +++ b/bindings/imgui_bundle/demos_python/demo_utils/demo_app_table.py @@ -87,7 +87,7 @@ def display_demo_app_table_with_scroll_buttons(self, window_name: str, window_si # Scroll buttons statics.scroll_delta = imgui.get_item_rect_size()[1] - hello_imgui.em_size(0.5) imgui.new_line() - imgui.same_line(imgui.get_window_width() - hello_imgui.em_size(4.0)) + imgui.same_line(imgui.get_item_rect_size().x - hello_imgui.em_size(3.0)) imgui.begin_disabled(statics.scroll_current == 0.0) if imgui.arrow_button("##up", imgui.Dir_.up):