Skip to content

Commit

Permalink
Fix windows overflow in TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
alef committed Aug 23, 2024
1 parent ea15d53 commit acbe5ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/third-party/imgui/imgui_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,13 @@ void ImGui::ShowDemoWindow(bool* p_open)
// We specify a default position/size in case there's no data in the .ini file.
// We only do it to make the demo applications a little more welcoming, but typically this isn't required.
const ImGuiViewport* main_viewport = ImGui::GetMainViewport();
#ifndef IMTUI
ImGui::SetNextWindowPos(ImVec2(main_viewport->WorkPos.x + 650, main_viewport->WorkPos.y + 20), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(550, 680), ImGuiCond_FirstUseEver);
#else
ImGui::SetNextWindowPos(ImVec2(main_viewport->WorkPos.x + 1, main_viewport->WorkPos.y + 1), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(main_viewport->WorkSize.x - 1, main_viewport->WorkSize.y - 1), ImGuiCond_FirstUseEver);
#endif

// Main body of the Demo window starts here.
if (!ImGui::Begin("Dear ImGui Demo", p_open, window_flags))
Expand Down

0 comments on commit acbe5ce

Please sign in to comment.