ColorButton: As a small convenience, provide a text baseline.
This commit is contained in:
parent
e9ff7162bc
commit
0260fdd1c6
@ -9419,7 +9419,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
|||||||
if (size.y == 0.0f)
|
if (size.y == 0.0f)
|
||||||
size.y = default_size;
|
size.y = default_size;
|
||||||
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
|
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
|
||||||
ItemSize(bb);
|
ItemSize(bb, (size.y >= default_size) ? g.Style.FramePadding.y : 0.0f);
|
||||||
if (!ItemAdd(bb, id))
|
if (!ItemAdd(bb, id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user