fix(layout): the clock format and the per-tab timestamp switch move row heights

Two more axes the height cache never knew about, and the second one is not even
wired up yet -- it is about to be.

Use24HourClock changes the stamp from 15:45 to 3:45 PM. The stamp sits at the
head of the line with SameLine(0,0), so the wrap width every following word is
measured against shrinks. Rows that wrap near that boundary get a different
height, and nothing dropped the cache.

DisplayTimestamp is per tab, which is why BuildLayoutFingerprint now takes the
tab. It only ever read Plugin.Config before -- the per-tab part of this system is
the gate, one per tab, comparing fingerprints that knew nothing about tabs. The
switch is dead today and gets its reader in the next commit; the axis goes in
first so the cache is right the moment it starts doing something.

Both are toggles, so they sit in the discrete half and skip the settle window.
This commit is contained in:
2026-08-19 11:44:30 +02:00
parent ad7421fbed
commit a841942b41
2 changed files with 17 additions and 4 deletions
+4 -2
View File
@@ -99,7 +99,7 @@ internal sealed class MessageList
// swaps between two differently sized faces), FontsEnabled and UseHellionFont // swaps between two differently sized faces), FontsEnabled and UseHellionFont
// (both swap the face outright, and their two size fields default to the same // (both swap the face outright, and their two size fields default to the same
// 12.75f -- so the fingerprint did not move while the glyph widths did). // 12.75f -- so the fingerprint did not move while the glyph widths did).
private LayoutFingerprint BuildLayoutFingerprint(float contentWidth) private LayoutFingerprint BuildLayoutFingerprint(Tab tab, float contentWidth)
{ {
var fonts = _fonts.EffectiveFontFingerprint(); var fonts = _fonts.EffectiveFontFingerprint();
return new LayoutFingerprint( return new LayoutFingerprint(
@@ -112,6 +112,8 @@ internal sealed class MessageList
Plugin.Config.FontsEnabled, Plugin.Config.FontsEnabled,
Plugin.Config.UseHellionFont, Plugin.Config.UseHellionFont,
Plugin.Config.ItalicEnabled, Plugin.Config.ItalicEnabled,
Plugin.Config.Use24HourClock,
tab.DisplayTimestamp,
(int)Plugin.Config.NameFormMode, (int)Plugin.Config.NameFormMode,
(int)Plugin.Config.WorldSuffixMode, (int)Plugin.Config.WorldSuffixMode,
contentWidth, contentWidth,
@@ -131,7 +133,7 @@ internal sealed class MessageList
_fingerprintGates[tab.Identifier] = gate; _fingerprintGates[tab.Identifier] = gate;
} }
if (!gate.ShouldInvalidate(BuildLayoutFingerprint(contentWidth), nowMs)) if (!gate.ShouldInvalidate(BuildLayoutFingerprint(tab, contentWidth), nowMs))
return; return;
using var messages = tab.Messages.GetReadOnly(3); using var messages = tab.Messages.GetReadOnly(3);
+13 -2
View File
@@ -12,6 +12,8 @@ internal readonly record struct LayoutFingerprint(
bool FontsEnabled, bool FontsEnabled,
bool UseHellionFont, bool UseHellionFont,
bool ItalicEnabled, bool ItalicEnabled,
bool Use24Hour,
bool ShowTimestamp,
int NameForm, int NameForm,
int WorldSuffix, int WorldSuffix,
float Width, float Width,
@@ -21,8 +23,17 @@ internal readonly record struct LayoutFingerprint(
// Toggles: they land on a new value in one frame and stay there. Waiting on // Toggles: they land on a new value in one frame and stay there. Waiting on
// them would leave the planner running against the previous density's // them would leave the planner running against the previous density's
// heights while the rows are already painted the new way. // heights while the rows are already painted the new way.
internal (bool, bool, bool, bool, int, int) Discrete => internal (bool, bool, bool, bool, bool, bool, int, int) Discrete =>
(Compact, FontsEnabled, UseHellionFont, ItalicEnabled, NameForm, WorldSuffix); (
Compact,
FontsEnabled,
UseHellionFont,
ItalicEnabled,
Use24Hour,
ShowTimestamp,
NameForm,
WorldSuffix
);
} }
// Dragging a window edge or the Dalamud UI-scale slider moves the continuous // Dragging a window edge or the Dalamud UI-scale slider moves the continuous