mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-24 20:57:00 +00:00
ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label.
This commit is contained in:
parent
fa2b318dd6
commit
54fb051e52
@ -56,6 +56,7 @@ Other Changes:
|
|||||||
- IsItemHovered(): added ImGuiHoveredFlags_NoNavOverride to disable the behavior where the
|
- IsItemHovered(): added ImGuiHoveredFlags_NoNavOverride to disable the behavior where the
|
||||||
return value is overriden by focus when gamepad/keyboard navigation is active.
|
return value is overriden by focus when gamepad/keyboard navigation is active.
|
||||||
- Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate.
|
- Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate.
|
||||||
|
- ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label.
|
||||||
- Stack Tool: Added option to copy item path to clipboard. (#4631)
|
- Stack Tool: Added option to copy item path to clipboard. (#4631)
|
||||||
- Misc: Fixed IsAnyItemHovered() returning false when using navigation.
|
- Misc: Fixed IsAnyItemHovered() returning false when using navigation.
|
||||||
- Misc: Added constexpr to ImVec2/ImVec4 inline constructors. (#4995) [@Myriachan]
|
- Misc: Added constexpr to ImVec2/ImVec4 inline constructors. (#4995) [@Myriachan]
|
||||||
|
@ -4997,8 +4997,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag
|
|||||||
|
|
||||||
if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel))
|
if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel))
|
||||||
{
|
{
|
||||||
const float text_offset_x = (flags & ImGuiColorEditFlags_NoInputs) ? w_button : w_full + style.ItemInnerSpacing.x;
|
SameLine(0.0f, style.ItemInnerSpacing.x);
|
||||||
window->DC.CursorPos = ImVec2(pos.x + text_offset_x, pos.y + style.FramePadding.y);
|
|
||||||
TextEx(label, label_display_end);
|
TextEx(label, label_display_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user