mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
Dynamic name column width + click-in-padding keeps edit active
- Compute effective name column width from longest field name (8-22 chars) - Store layout in ComposeResult, cache in editor for span calculations - Parameterize span functions to use runtime nameW instead of fixed constant - Click within column padding during edit moves cursor to end instead of committing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,8 +25,8 @@ public:
|
||||
|
||||
// ── Column span computation ──
|
||||
static ColumnSpan typeSpan(const LineMeta& lm);
|
||||
static ColumnSpan nameSpan(const LineMeta& lm);
|
||||
static ColumnSpan valueSpan(const LineMeta& lm, int lineLength);
|
||||
static ColumnSpan nameSpan(const LineMeta& lm, int nameW = kColName);
|
||||
static ColumnSpan valueSpan(const LineMeta& lm, int lineLength, int nameW = kColName);
|
||||
|
||||
// ── Multi-selection ──
|
||||
QSet<int> selectedNodeIndices() const;
|
||||
@@ -55,6 +55,7 @@ private:
|
||||
QsciScintilla* m_sci = nullptr;
|
||||
QsciLexerCPP* m_lexer = nullptr;
|
||||
QVector<LineMeta> m_meta;
|
||||
LayoutInfo m_layout; // cached from ComposeResult
|
||||
|
||||
int m_marginStyleBase = -1;
|
||||
int m_hintLine = -1;
|
||||
|
||||
Reference in New Issue
Block a user