Style tweaks, disabled default window rounding by default, reduced size of resize grip, made less prominent, increased WindowBg alpha in classic style.

TestEngine: Fixed Checkbox() not reporting its checkable state when clipped.
This commit is contained in:
ocornut
2020-12-24 11:42:28 +01:00
parent 3fbb928c9f
commit b015ea93fd
7 changed files with 25 additions and 18 deletions

View File

@ -1063,7 +1063,10 @@ bool ImGui::Checkbox(const char* label, bool* v)
const ImRect total_bb(pos, pos + ImVec2(square_sz + (label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f), label_size.y + style.FramePadding.y * 2.0f));
ItemSize(total_bb, style.FramePadding.y);
if (!ItemAdd(total_bb, id))
{
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
return false;
}
bool hovered, held;
bool pressed = ButtonBehavior(total_bb, id, &hovered, &held);