Skip to content

Commit

Permalink
layout scroll button demo app table
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 2, 2023
1 parent 2d23d32 commit 86686c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 86686c8

Please sign in to comment.