mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
feat: tree lines, scanner improvements, themes, tooltips, README overhaul
- Tree line connectors (Unicode box-drawing ├─ └─ │) at arbitrary depth - Fix editor overwriting tree chars at depth 2+ (applyMarginText Pass 2) - Scanner: unknown value scan, comparison rescan modes (Changed/Unchanged/Increased/Decreased) - New Tailwind theme (tw.json), WCAG contrast fixes for warm/mid themes - Tooltip system (rcxtooltip.h) - Comprehensive README rewrite with full feature inventory - New tests for compose tree lines, scanner, tooltips Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,8 +72,9 @@ RcxDocument::RcxDocument(QObject* parent)
|
||||
});
|
||||
}
|
||||
|
||||
ComposeResult RcxDocument::compose(uint64_t viewRootId, bool compactColumns) const {
|
||||
return rcx::compose(tree, *provider, viewRootId, compactColumns);
|
||||
ComposeResult RcxDocument::compose(uint64_t viewRootId, bool compactColumns,
|
||||
bool treeLines) const {
|
||||
return rcx::compose(tree, *provider, viewRootId, compactColumns, treeLines);
|
||||
}
|
||||
|
||||
bool RcxDocument::save(const QString& path) {
|
||||
@@ -319,7 +320,7 @@ void RcxController::connectEditor(RcxEditor* editor) {
|
||||
// Regular type change
|
||||
bool ok;
|
||||
NodeKind k = kindFromTypeName(text, &ok);
|
||||
if (ok) {
|
||||
if (ok && k != NodeKind::Struct && k != NodeKind::Array) {
|
||||
changeNodeKind(nodeIdx, k);
|
||||
} else if (nodeIdx < m_doc->tree.nodes.size()) {
|
||||
// Check if it's a defined struct type name
|
||||
@@ -546,6 +547,7 @@ void RcxController::resetChangeTracking() {
|
||||
m_changedOffsets.clear();
|
||||
m_valueHistory.clear();
|
||||
m_prevPages.clear();
|
||||
m_valueTrackCooldown = 5; // suppress tracking for ~1s
|
||||
for (auto& lm : m_lastResult.meta)
|
||||
lm.heatLevel = 0;
|
||||
}
|
||||
@@ -556,9 +558,9 @@ void RcxController::refresh() {
|
||||
|
||||
// Compose against snapshot provider if active, otherwise real provider
|
||||
if (m_snapshotProv)
|
||||
m_lastResult = rcx::compose(m_doc->tree, *m_snapshotProv, m_viewRootId, m_compactColumns);
|
||||
m_lastResult = rcx::compose(m_doc->tree, *m_snapshotProv, m_viewRootId, m_compactColumns, m_treeLines);
|
||||
else
|
||||
m_lastResult = m_doc->compose(m_viewRootId, m_compactColumns);
|
||||
m_lastResult = m_doc->compose(m_viewRootId, m_compactColumns, m_treeLines);
|
||||
|
||||
s_composeDoc = nullptr;
|
||||
|
||||
@@ -602,7 +604,8 @@ void RcxController::refresh() {
|
||||
else if (m_doc->provider && m_doc->provider->isValid() && m_doc->provider->isLive())
|
||||
prov = m_doc->provider.get();
|
||||
|
||||
if (m_trackValues && prov) {
|
||||
if (m_valueTrackCooldown > 0) --m_valueTrackCooldown;
|
||||
if (m_trackValues && prov && m_valueTrackCooldown <= 0) {
|
||||
for (auto& lm : m_lastResult.meta) {
|
||||
if (lm.nodeIdx < 0 || lm.nodeIdx >= m_doc->tree.nodes.size()) continue;
|
||||
if (isSyntheticLine(lm) || lm.isContinuation) continue;
|
||||
@@ -1710,6 +1713,7 @@ void RcxController::showContextMenu(RcxEditor* editor, int line, int nodeIdx,
|
||||
m_refreshGen++; // discard in-flight async reads
|
||||
m_prevPages.clear(); // clean baseline for next read cycle
|
||||
m_changedOffsets.clear(); // no phantom change indicators
|
||||
m_valueTrackCooldown = 5; // suppress tracking for ~1s
|
||||
refresh();
|
||||
for (auto* editor : m_editors)
|
||||
editor->dismissHistoryPopup();
|
||||
@@ -1935,6 +1939,7 @@ void RcxController::showContextMenu(RcxEditor* editor, int line, int nodeIdx,
|
||||
m_refreshGen++; // discard in-flight async reads
|
||||
m_prevPages.clear(); // clean baseline for next read cycle
|
||||
m_changedOffsets.clear(); // no phantom change indicators
|
||||
m_valueTrackCooldown = 5; // suppress tracking for ~1s
|
||||
refresh();
|
||||
for (auto* editor : m_editors)
|
||||
editor->dismissHistoryPopup();
|
||||
@@ -2608,7 +2613,7 @@ void RcxController::showTypePopup(RcxEditor* editor, TypePopupMode mode,
|
||||
break;
|
||||
|
||||
case TypePopupMode::FieldType: {
|
||||
addPrimitives(/*enabled=*/true, /*excludeStructArrayPad=*/false);
|
||||
addPrimitives(/*enabled=*/true, /*excludeStructArrayPad=*/true);
|
||||
bool isPtr = node
|
||||
&& (node->kind == NodeKind::Pointer32 || node->kind == NodeKind::Pointer64);
|
||||
bool isTypedPtr = isPtr && node->refId != 0;
|
||||
@@ -3181,6 +3186,11 @@ void RcxController::setCompactColumns(bool v) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
void RcxController::setTreeLines(bool v) {
|
||||
m_treeLines = v;
|
||||
refresh();
|
||||
}
|
||||
|
||||
void RcxController::setupAutoRefresh() {
|
||||
int ms = QSettings("Reclass", "Reclass").value("refreshMs", 660).toInt();
|
||||
m_refreshTimer = new QTimer(this);
|
||||
|
||||
Reference in New Issue
Block a user