feat: turn sentinel dock tab into "+" new tab button

Instead of hiding the sentinel tab (which leaked space on macOS),
repurpose it as a visible "+" button that creates a new struct tab
on click. Compact 32px icon-only tab with pixel-perfect cross drawn
via fillRect. Skips context menu and middle-click. Always positioned
as the last tab in the group.
This commit is contained in:
IChooseYou
2026-03-16 07:39:18 -06:00
committed by IChooseYou
parent ecb954f9e2
commit d22661446b
11 changed files with 531 additions and 188 deletions

View File

@@ -128,12 +128,12 @@ inline constexpr uint32_t flagsFor(NodeKind k) {
const auto* m = kindMeta(k);
return m ? m->flags : 0;
}
inline constexpr bool isHexPreview(NodeKind k) {
return flagsFor(k) & KF_HexPreview;
}
inline constexpr bool isHexNode(NodeKind k) {
return k >= NodeKind::Hex8 && k <= NodeKind::Hex64;
}
inline constexpr bool isHexPreview(NodeKind k) {
return isHexNode(k);
}
inline constexpr bool isVectorKind(NodeKind k) {
return k == NodeKind::Vec2 || k == NodeKind::Vec3 || k == NodeKind::Vec4;
}
@@ -158,8 +158,6 @@ inline QStringList allTypeNamesForUI(bool /*stripBrackets*/ = false) {
out.reserve(std::size(kKindMeta));
for (const auto& m : kKindMeta)
out << QString::fromLatin1(m.typeName);
out.sort(Qt::CaseInsensitive);
out.removeDuplicates();
return out;
}
@@ -175,6 +173,7 @@ enum Marker : int {
M_SELECTED = 7,
M_CMD_ROW = 8,
M_ACCENT = 9,
M_FOCUS = 10, // Presentation mode: AI focus glow
};
// ── Bitfield member (name + bit position + width within a container) ──