Browse Source

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

pull/1396/head
omar 7 years ago
parent
commit
f962ca0b01
  1. 2
      imgui.cpp

2
imgui.cpp

@ -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)

Loading…
Cancel
Save