Hello,
I’m not sure if it’s an issue actually or I just got something wrong.
I have follwoing code from the examples and modified it to get rid of the main window padding:
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
ImGui::Begin("Main", nullptr, ImVec2(display_w, display_h), 0.0f, kMainWndFlags);
ImGui::PopStyleVar();
if (ImGui::BeginMenuBar()) {
if (ImGui::BeginMenu("File")) {
if (ImGui::MenuItem("Close", "Ctrl+W")) { kAppState.active = false; }
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
}
ImGui::End();
ImGui::PopStyleVar(); // padding
If I run this code the main window has no padding as intended but the “file” menu item also has no top padding.
What am I doing wrong here?
See following screenshot: https://imgur.com/a/QdjCZ9v
Thx in advance. Regards.