Widen value column to 96 chars, remove Mat4x4 truncation

kColValue 32 -> 96 to prevent float truncation with ellipsis.
Mat4x4 rows bypass fit() entirely so long matrix rows display fully.
Updated test expectations to use kColValue instead of hardcoded 32.
This commit is contained in:
batallaion caputa
2026-02-11 10:44:24 -07:00
parent 968476b65a
commit 33a093ae7d
3 changed files with 6 additions and 6 deletions

View File

@@ -507,7 +507,7 @@ enum class EditTarget { Name, Type, Value, BaseAddress, Source, ArrayIndex, Arra
inline constexpr int kFoldCol = 3; // 3-char fold indicator prefix per line
inline constexpr int kColType = 14; // Max type column width (fits "uint64_t[999]")
inline constexpr int kColName = 22;
inline constexpr int kColValue = 32;
inline constexpr int kColValue = 96;
inline constexpr int kColComment = 28; // "// Enter=Save Esc=Cancel" fits
inline constexpr int kColBaseAddr = 12; // "0x" + up to 10 hex digits (40-bit address)
inline constexpr int kSepWidth = 1;

View File

@@ -337,9 +337,9 @@ QString fmtNodeLine(const Node& node, const Provider& prov,
QString cmtSuffix = comment.isEmpty() ? QString()
: fit(comment, COL_COMMENT);
// Mat4x4: subLine 0..3 = rows
// Mat4x4: subLine 0..3 = rows — no truncation so large floats always display fully
if (node.kind == NodeKind::Mat4x4) {
QString val = fit(readValue(node, prov, addr, subLine), COL_VALUE);
QString val = readValue(node, prov, addr, subLine);
if (subLine == 0) return ind + type + SEP + name + SEP + val + cmtSuffix;
return ind + QString(prefixW, ' ') + val + cmtSuffix;
}

View File

@@ -336,7 +336,7 @@ private slots:
auto vs = rcx::valueSpanFor(lm, 100);
QVERIFY(vs.valid);
QCOMPARE(vs.start, 44); // 21 + 22 + 1 (kSepWidth)
QCOMPARE(vs.end, 76); // 44 + 32 (kColValue)
QCOMPARE(vs.end, 44 + rcx::kColValue);
}
void testColumnSpan_continuation() {
@@ -352,7 +352,7 @@ private slots:
auto vs = rcx::valueSpanFor(lm, 100);
QVERIFY(vs.valid);
QCOMPARE(vs.start, 6 + 14 + 22 + 2); // kFoldCol+indent + kColType(14) + kColName(22) + 2*kSepWidth
QCOMPARE(vs.end, 44 + 32); // start + kColValue
QCOMPARE(vs.end, 44 + rcx::kColValue);
}
void testColumnSpan_headerFooter() {
@@ -392,7 +392,7 @@ private slots:
auto vs = rcx::valueSpanFor(lm, 100);
QVERIFY(vs.valid);
QCOMPARE(vs.start, 41); // 18 + 22 + 1 (kSepWidth)
QCOMPARE(vs.end, 73); // 41 + 32 (kColValue)
QCOMPARE(vs.end, 41 + rcx::kColValue); // start + kColValue
}
void testNodeIdJsonRoundTrip() {