- Switch SetTooltip to ImRaii based Tooltip

- Shorter date format for db viewer
This commit is contained in:
Infi
2024-11-21 12:31:09 +01:00
parent 3cfe65d2d4
commit d0a55e80ea
9 changed files with 30 additions and 30 deletions
+4 -4
View File
@@ -553,7 +553,7 @@ public sealed class ChatLogWindow : Window
ImGui.OpenPopup(ChatChannelPicker);
if (activeTab.Channel is not null && ImGui.IsItemHovered())
ImGui.SetTooltip(Language.ChatLog_SwitcherDisabled);
ImGuiUtil.Tooltip(Language.ChatLog_SwitcherDisabled);
using (var popup = ImRaii.Popup(ChatChannelPicker))
{
@@ -1148,11 +1148,11 @@ public sealed class ChatLogWindow : Window
ImGui.TextUnformatted(timestamp);
// We use an IsItemHovered() check here instead of
// just calling SetTooltip() to avoid computing the
// just calling Tooltip() to avoid computing the
// tooltip string for all visible items on every
// frame.
if (ImGui.IsItemHovered())
ImGui.SetTooltip(message.Date.ToLocalTime().ToString("F"));
ImGuiUtil.Tooltip(message.Date.ToLocalTime().ToString("F"));
}
else
{
@@ -1704,7 +1704,7 @@ public sealed class ChatLogWindow : Window
ImGui.Dummy(emoteSize);
if (ImGui.IsItemHovered())
ImGui.SetTooltip(emotePayload.Code);
ImGuiUtil.Tooltip(emotePayload.Code);
return;
}