Combo: added ImGuiComboFlags_WidthFitPreview. (#6881)

This commit is contained in:
mpv-enjoyer
2023-10-09 11:24:52 +02:00
committed by ocornut
parent 001f102f38
commit 112d8fc41d
3 changed files with 4 additions and 1 deletions

View File

@ -1190,6 +1190,7 @@ static void ShowDemoWindowWidgets()
static ImGuiComboFlags flags = 0;
ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", &flags, ImGuiComboFlags_PopupAlignLeft);
ImGui::SameLine(); HelpMarker("Only makes a difference if the popup is larger than the combo");
ImGui::CheckboxFlags("ImGuiComboFlags_WidthFitPreview", &flags, ImGuiComboFlags_WidthFitPreview);
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoArrowButton", &flags, ImGuiComboFlags_NoArrowButton))
flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both
if (ImGui::CheckboxFlags("ImGuiComboFlags_NoPreview", &flags, ImGuiComboFlags_NoPreview))