Skip to content

switch message from text field to text view#104

Open
scoates wants to merge 2 commits into
viktorstrate:mainfrom
sloatescoan:103-fix-selection
Open

switch message from text field to text view#104
scoates wants to merge 2 commits into
viktorstrate:mainfrom
sloatescoan:103-fix-selection

Conversation

@scoates
Copy link
Copy Markdown
Contributor

@scoates scoates commented Jun 2, 2026

to handle the weird 'activated' mode that was changing colour

This was making the text the wrong colour after clicking (see #103; closes #103).

I mostly only know SwiftUI, so this may be entirely the wrong path here—definitely open to review and suggestions—but this does fix the poor behaviour I experienced.

@scoates scoates marked this pull request as draft June 2, 2026 01:12
@scoates
Copy link
Copy Markdown
Contributor Author

scoates commented Jun 2, 2026

Converted to draft because it immediately changed the behaviour to this when I rolled over my own (longer) message. Fixes/feedback welcome.

image

image

@scoates
Copy link
Copy Markdown
Contributor Author

scoates commented Jun 2, 2026

Riffing on the container size got me here and it seems to be working now. (Would love confirmations.)

@scoates scoates marked this pull request as ready for review June 2, 2026 01:23
@viktorstrate
Copy link
Copy Markdown
Owner

So to my understanding NSTextField is an optimized version of NSTextView. It has a lightweight draw-only verison, that only renders the text, but as soon as the user interacts with it (selecting or editing), it switches to an internal NSTextView for that operation.

It would be ideal to keep NSTextField if possible, because it would be significantly more performant for long timelines, but it's a bit more tricky to get right.

@scoates
Copy link
Copy Markdown
Contributor Author

scoates commented Jun 2, 2026

Yeah; fair enough. I'll poke at this some more with that in mind. I'm pretty far out of my SwiftUI lane here though (-;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Message with a link changes colour when clicked.

2 participants