feat(ui): auto-focus tab rename and raise buffer to 512
This commit is contained in:
@@ -2484,8 +2484,13 @@ public sealed class ChatLogWindow : Window
|
|||||||
var anyChanged = false;
|
var anyChanged = false;
|
||||||
var tabs = Plugin.Config.Tabs;
|
var tabs = Plugin.Config.Tabs;
|
||||||
|
|
||||||
|
// UI-4: focus the rename field on the frame the context menu opens so
|
||||||
|
// the user can type immediately. Buffer raised 128 -> 512 to match the
|
||||||
|
// settings-tab rename (Ui/SettingsTabs/Tabs.cs) — one name limit, not two.
|
||||||
|
if (ImGui.IsWindowAppearing())
|
||||||
|
ImGui.SetKeyboardFocusHere();
|
||||||
ImGui.SetNextItemWidth(250f * ImGuiHelpers.GlobalScale);
|
ImGui.SetNextItemWidth(250f * ImGuiHelpers.GlobalScale);
|
||||||
if (ImGui.InputText("##tab-name", ref tab.Name, 128))
|
if (ImGui.InputText("##tab-name", ref tab.Name, 512))
|
||||||
anyChanged = true;
|
anyChanged = true;
|
||||||
|
|
||||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.TrashAlt, tooltip: Language.ChatLog_Tabs_Delete))
|
if (ImGuiUtil.IconButton(FontAwesomeIcon.TrashAlt, tooltip: Language.ChatLog_Tabs_Delete))
|
||||||
|
|||||||
Reference in New Issue
Block a user