ImGui: pad last button in server browser correctly

Previously, it would clip with the resize handle due to commit eda8048a982f88611710bcded1d2245e9d42d95e
This commit is contained in:
Kawe Mazidjatari 2024-03-02 01:47:11 +01:00
parent 5f41c4e9f1
commit 06a4587ab7

View File

@ -343,7 +343,11 @@ void CBrowser::DrawBrowserPanel(void)
}
ImGui::SameLine();
if (ImGui::Button("Private servers", ImVec2(itemWidth, ImGui::GetFrameHeight())))
// NOTE: -9 to prevent the last button from clipping/colliding with the
// window drag handle! -9 makes the distance between the handle and the
// last button equal as that of the developer console.
if (ImGui::Button("Private servers", ImVec2(itemWidth - 9, ImGui::GetFrameHeight())))
{
ImGui::OpenPopup("Private Server");
}