commit | 0260fdd1c6c7198d60fcbd02cce82e4deb8954f4 | [log] [tgz] |
---|---|---|
author | omar <omarcornut@gmail.com> | Tue Oct 24 12:10:37 2017 +0200 |
committer | omar <omarcornut@gmail.com> | Tue Oct 24 14:38:32 2017 +0200 |
tree | d2a487a1fbaf25358b6bd2616ae158f405e265ba | |
parent | e9ff7162bca1fab3f110b84b5d55e9ad26a762f6 [diff] |
ColorButton: As a small convenience, provide a text baseline.
diff --git a/imgui.cpp b/imgui.cpp index 15b1f9d..b8bf8d5 100644 --- a/imgui.cpp +++ b/imgui.cpp
@@ -9419,7 +9419,7 @@ if (size.y == 0.0f) size.y = default_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)) return false;