|
@@ -3868,9 +3868,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]);
|
|
PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]);
|
|
PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding);
|
|
PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding);
|
|
PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize);
|
|
PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize);
|
|
- PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
|
|
|
|
- bool child_visible = BeginChildEx(label, id, frame_bb.GetSize(), true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding);
|
|
|
|
- PopStyleVar(3);
|
|
|
|
|
|
+ bool child_visible = BeginChildEx(label, id, frame_bb.GetSize(), true, ImGuiWindowFlags_NoMove);
|
|
|
|
+ PopStyleVar(2);
|
|
PopStyleColor();
|
|
PopStyleColor();
|
|
if (!child_visible)
|
|
if (!child_visible)
|
|
{
|
|
{
|
|
@@ -3880,6 +3879,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
}
|
|
}
|
|
draw_window = g.CurrentWindow; // Child window
|
|
draw_window = g.CurrentWindow; // Child window
|
|
draw_window->DC.NavLayerActiveMaskNext |= (1 << draw_window->DC.NavLayerCurrent); // This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
|
|
draw_window->DC.NavLayerActiveMaskNext |= (1 << draw_window->DC.NavLayerCurrent); // This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
|
|
|
|
+ draw_window->DC.CursorPos += style.FramePadding;
|
|
inner_size.x -= draw_window->ScrollbarSizes.x;
|
|
inner_size.x -= draw_window->ScrollbarSizes.x;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -4040,7 +4040,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
|
|
|
// Edit in progress
|
|
// Edit in progress
|
|
const float mouse_x = (io.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + state->ScrollX;
|
|
const float mouse_x = (io.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + state->ScrollX;
|
|
- const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize * 0.5f));
|
|
|
|
|
|
+ const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y) : (g.FontSize * 0.5f));
|
|
|
|
|
|
const bool is_osx = io.ConfigMacOSXBehaviors;
|
|
const bool is_osx = io.ConfigMacOSXBehaviors;
|
|
if (select_all || (hovered && !is_osx && io.MouseDoubleClicked[0]))
|
|
if (select_all || (hovered && !is_osx && io.MouseDoubleClicked[0]))
|
|
@@ -4489,10 +4489,11 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
if (!(flags & ImGuiInputTextFlags_NoHorizontalScroll))
|
|
if (!(flags & ImGuiInputTextFlags_NoHorizontalScroll))
|
|
{
|
|
{
|
|
const float scroll_increment_x = inner_size.x * 0.25f;
|
|
const float scroll_increment_x = inner_size.x * 0.25f;
|
|
|
|
+ const float visible_width = inner_size.x - style.FramePadding.x;
|
|
if (cursor_offset.x < state->ScrollX)
|
|
if (cursor_offset.x < state->ScrollX)
|
|
state->ScrollX = IM_FLOOR(ImMax(0.0f, cursor_offset.x - scroll_increment_x));
|
|
state->ScrollX = IM_FLOOR(ImMax(0.0f, cursor_offset.x - scroll_increment_x));
|
|
- else if (cursor_offset.x - inner_size.x >= state->ScrollX)
|
|
|
|
- state->ScrollX = IM_FLOOR(cursor_offset.x - inner_size.x + scroll_increment_x);
|
|
|
|
|
|
+ else if (cursor_offset.x - visible_width >= state->ScrollX)
|
|
|
|
+ state->ScrollX = IM_FLOOR(cursor_offset.x - visible_width + scroll_increment_x);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -4597,7 +4598,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
|
|
|
if (is_multiline)
|
|
if (is_multiline)
|
|
{
|
|
{
|
|
- Dummy(text_size);
|
|
|
|
|
|
+ Dummy(ImVec2(text_size.x, text_size.y + style.FramePadding.y));
|
|
EndChild();
|
|
EndChild();
|
|
EndGroup();
|
|
EndGroup();
|
|
}
|
|
}
|