diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index 3d2a502..367a9ca 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -419,8 +419,9 @@ public sealed class ChatLogWindow : Window // The hint banner renders before this block so ImGui already accounts for it. height -= ImGui.GetFrameHeightWithSpacing(); - // Status bar at the window bottom reserves 22px + 2px spacing. - height -= StatusBar.Height + 2; + // StatusBar.Height now bakes in its own DPI-aware 2px spacer, so the + // window reservation is just Height -- no extra +2 (v1.4.8 B1). + height -= StatusBar.Height; return height; } diff --git a/HellionChat/Ui/StatusBar.cs b/HellionChat/Ui/StatusBar.cs index 8883b92..170fea3 100644 --- a/HellionChat/Ui/StatusBar.cs +++ b/HellionChat/Ui/StatusBar.cs @@ -2,6 +2,7 @@ using System.Globalization; using System.Numerics; using Dalamud.Bindings.ImGui; using Dalamud.Interface; +using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using HellionChat.Code; using HellionChat.Resources; @@ -9,12 +10,20 @@ using HellionChat.Util; namespace HellionChat.Ui; -// Bottom status bar, 22px tall. Slots left to right: channel indicator, -// privacy badge, counts, tells (hidden at 0), version (right-aligned). -// Updates at 1Hz; format strings are cached between updates. +// Bottom status bar. Slots left to right: channel indicator, privacy badge, +// counts, tells (hidden at 0), version (right-aligned). Updates at 1Hz; +// format strings are cached between updates. internal sealed class StatusBar { - public const float Height = 22f; + // DPI-aware bar height. The previous fixed 22px constant clipped on + // Windows display-scaling >100% because ImGui renders the font bigger + // than the reservation. GetTextLineHeightWithSpacing scales with the + // current ImGui font; the 2px spacer is GlobalScale-rounded to stay + // on integer pixel boundaries (same idiom as v1.4.6 F7.2 underline-pill + // in ChatLogWindow.cs:1639-1653). + public static float Height => + ImGui.GetTextLineHeightWithSpacing() + MathF.Round(2f * ImGuiHelpers.GlobalScale); + private const long UpdateIntervalMs = 1000; // Initially outdated so the first frame always computes fresh.