mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-30 05:45:29 +08:00
InputText: Fixed a glitch when using ImGuiInputTextFlags_ElideLeft where the local x offset would be incorrect during the deactivation frame. (#9298)
This commit is contained in:
@@ -85,6 +85,8 @@ Other Changes:
|
|||||||
- Reworked io.ConfigInputTextEnterKeepActive mode so that pressing Enter will
|
- Reworked io.ConfigInputTextEnterKeepActive mode so that pressing Enter will
|
||||||
deactivate/reactivate the item in order for e.g. IsItemDeactivatedAfterEdit()
|
deactivate/reactivate the item in order for e.g. IsItemDeactivatedAfterEdit()
|
||||||
signals to be emitted the same way regardless of that setting. (#9001, #9115)
|
signals to be emitted the same way regardless of that setting. (#9001, #9115)
|
||||||
|
- Fixed a glitch when using ImGuiInputTextFlags_ElideLeft where the local x offset
|
||||||
|
would be incorrect during the deactivation frame. (#9298)
|
||||||
- Style:
|
- Style:
|
||||||
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||||
- When using large values with ScallAllSizes(), the following items thickness
|
- When using large values with ScallAllSizes(), the following items thickness
|
||||||
|
|||||||
+1
-1
@@ -5568,7 +5568,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find render position for right alignment (single-line only)
|
// Find render position for right alignment (single-line only)
|
||||||
if (g.ActiveId != id && flags & ImGuiInputTextFlags_ElideLeft)
|
if (g.ActiveId != id && (flags & ImGuiInputTextFlags_ElideLeft) && !render_cursor && !render_selection)
|
||||||
draw_pos.x = ImMin(draw_pos.x, frame_bb.Max.x - CalcTextSize(buf_display, NULL).x - style.FramePadding.x);
|
draw_pos.x = ImMin(draw_pos.x, frame_bb.Max.x - CalcTextSize(buf_display, NULL).x - style.FramePadding.x);
|
||||||
//draw_scroll.x = state->Scroll.x; // Preserve scroll when inactive?
|
//draw_scroll.x = state->Scroll.x; // Preserve scroll when inactive?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user