Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better text editing support #474

Open
9 of 11 tasks
ogoffart opened this issue Sep 6, 2021 · 4 comments
Open
9 of 11 tasks

Better text editing support #474

ogoffart opened this issue Sep 6, 2021 · 4 comments
Labels
a:text Text rendering, fonts, Text input (mS,bF) enhancement New feature or request

Comments

@ogoffart
Copy link
Member

ogoffart commented Sep 6, 2021

Current implementation of text edition lack some feature

@jacquetc
Copy link

Hello, I just learned about the existence of .60, but I have a good-enough experience with Qt QML. Since .60 is influenced by the work done on QML language, I only want to point out that in Qt Quick's TextEdit and TextArea, the shortcuts PageUp and PageDown aren't implement too. Maybe there is a reason ?
Managing shortcuts (Ctrl + xx) can be cumbersome when the code is meant to be a simple base. Also, maybe these shortcuts are different depending of the OS ? Same with the way a text is selected. Maybe some dev would want one day to color a word when double-clicking on it ? Imposing these behaviors is constricting the usage.
I think it would be more beneficial to create a whole new widget, which would inheriting TextEdit. What do you think ?

@tronical
Copy link
Member

You're right that different platforms have slightly different shortcuts (for example cmd vs. control on macOS). IMO that should be handled transparently to the developer though, i.e. the primitive text input element should (and does) handle those.

There is the need for a way for developers to override shortcuts in the application code. That's a missing feature at the moment.

Note that implementation wise TextEdit is built on the TextInput and ScrollView right now. Such a composition could be done by hand if somebody wants to really fine-tune more aspects of the behavior.

@jacquetc
Copy link

I know Qt is automatically switching Windows' Ctrl with OSx's Cmd keys. We code "Ctrl+X", it becomes "Cmd+X" on OSX without worrying about it. It's an interesting behavior, I think.

Undo/Redo would need to be a framework, independent from TextEdit. Qt's QUndoCommand with QUndoStack could be a good inspiration.
I'm sorry to bring back Qt, but I am talking about what I know well. Surely that there are other/better ways to do Undo and I'm staying open. I'd love to help implement it.

@ogoffart ogoffart mentioned this issue Apr 4, 2022
@ogoffart ogoffart added the roadmap Tickets that we can use for roadmapping label Nov 29, 2022
@ogoffart ogoffart added the a:text Text rendering, fonts, Text input (mS,bF) label Jul 13, 2023
@wwsinsh
Copy link

wwsinsh commented Dec 20, 2023

hello, I advice that it is necessary to add an attribute to determine whether the scroll bar automatically scrolls the latest content when the content exceeds the current display area.

-- I extracted that into a separate issue: #4290

@tronical tronical added enhancement New feature or request and removed roadmap Tickets that we can use for roadmapping labels Jan 19, 2024
@tronical tronical changed the title Better text edit support Better text editing support Feb 6, 2024
Waqar144 added a commit to Waqar144/slint that referenced this issue Feb 7, 2024
Waqar144 added a commit to Waqar144/slint that referenced this issue Feb 7, 2024
tronical pushed a commit that referenced this issue Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:text Text rendering, fonts, Text input (mS,bF) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants