ColorTooltip: Resize ColorButton to align better with text, now that ColorButton provides a text baseline (0260fdd1c6)

This commit is contained in:
omar 2017-10-27 20:36:51 +02:00
parent c503a50cff
commit f962ca0b01

View File

@ -9303,7 +9303,7 @@ void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags
Separator();
}
ImVec2 sz(g.FontSize * 3, g.FontSize * 3);
ImVec2 sz(g.FontSize * 3 + g.Style.FramePadding.y * 2, g.FontSize * 3 + g.Style.FramePadding.y * 2);
ColorButton("##preview", ImVec4(col[0], col[1], col[2], col[3]), (flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)) | ImGuiColorEditFlags_NoTooltip, sz);
SameLine();
if (flags & ImGuiColorEditFlags_NoAlpha)