Separator: added and following style.SeparatorSize. (#2657, #9263)

Reapply c5d83d8a from 1.70 which was reverted in 9534ef9b2.
This commit is contained in:
ocornut
2026-02-26 17:21:57 +01:00
parent c40226e9de
commit ef022c5e0a
5 changed files with 43 additions and 10 deletions
+3 -1
View File
@@ -8507,6 +8507,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
SameLine(); HelpMarker("Alignment applies when a button is larger than its text content.");
SliderFloat2("SelectableTextAlign", (float*)&style.SelectableTextAlign, 0.0f, 1.0f, "%.2f");
SameLine(); HelpMarker("Alignment applies when a selectable is larger than its text content.");
SliderFloat("SeparatorSize", &style.SeparatorSize, 0.0f, 10.0f, "%.0f");
SliderFloat("SeparatorTextBorderSize", &style.SeparatorTextBorderSize, 0.0f, 10.0f, "%.0f");
SliderFloat2("SeparatorTextAlign", (float*)&style.SeparatorTextAlign, 0.0f, 1.0f, "%.2f");
SliderFloat2("SeparatorTextPadding", (float*)&style.SeparatorTextPadding, 0.0f, 40.0f, "%.0f");
@@ -8975,7 +8976,8 @@ struct ExampleAppConsole
ImGui::Separator();
// Reserve enough left-over height for 1 separator + 1 input text
const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing();
ImGuiStyle& style = ImGui::GetStyle();
const float footer_height_to_reserve = style.SeparatorSize + style.ItemSpacing.y + ImGui::GetFrameHeightWithSpacing();
if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), ImGuiChildFlags_NavFlattened, ImGuiWindowFlags_HorizontalScrollbar))
{
if (ImGui::BeginPopupContextWindow())