Restore QTextEdit widget for RTL text in the Cell Editor by mgrojo · Pull Request #1929 · sqlitebrowser/sqlitebrowser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This restores the Qt text widget that was replaced by a QScintilla one in
45c1e2a
QScintilla does not support right-to-left scripts like Arabic, so QTextEdit
is still needed for these languages. Since the QScintilla editor has other
advantages already explained, it is preserved for general text edition.
RTL texts are detected when data is loaded and the Qt editor is
automatically selected. This is done both when loading data from the cell
and when interactively typing RTL characters in the Cell Editor.
All these changes can be undone if a new QScintilla editor supports RTL
texts.
See comments in issue #1793
This restores the Qt text widget that was replaced by a QScintilla one in 45c1e2a QScintilla does not support right-to-left scripts like Arabic, so QTextEdit is still needed for these languages. Since the QScintilla editor has other advantages already explained, it is preserved for general text edition. RTL texts are detected when data is loaded and the Qt editor is automatically selected. This is done both when loading data from the cell and when interactively typing RTL characters in the Cell Editor. All these changes can be undone if a new QScintilla editor supports RTL texts. See comments in issue #1793
Yeah, sounds like this will be the way to go, until QScintilla supports RTL languages. Hopefully some day. 😄
Thanks for putting the time in for this @mgrojo. It can be a bit disappointing when a good idea doesn't work out. 😦
I make these pull request so users working with right-to-left languages can provide feedback before merging. @Johntaa can you compile from sources or would you need a build from this branch?
I'd like to know if the work flow displaying and entering RTL texts is correct.
I make these pull request so users working with right-to-left languages can provide feedback before merging. @Johntaa can you compile from sources or would you need a build from this branch?
I'd like to know if the work flow displaying and entering RTL texts is correct.
Wow, Thank you for taking this step , it is greatly appreciated. I prefer a build from this branch.
1 similar comment
Wow, Thank you for taking this step , it is greatly appreciated. I prefer a build from this branch.
And what operating system are you using, @Johntaa? In any case I think we'd need help from @justinclift.
Wow, Thank you for taking this step , it is greatly appreciated. I prefer a build from this branch.
And what operating system are you using, @Johntaa? In any case I think we'd need help from @justinclift.
Win64
@justinclift , Thank you .
@mgrojo : great work, but still there is a small problems, sometimes the text field starts with a Latin character, that causes the program to select TEXT option for the content type , which requires change it back to RTLText option which produce a non-ordered arabic text (Randomized Arabic words not in the right direction), the second problem is that the widget cannot wrap lines within its borders and will show the horizontal scroll bar in the bottom , in RtlText option.
@mgrojo : great work, but still there is a small problems, sometimes the text field starts with a Latin character, that causes the program to select TEXT option for the content type , which requires change it back to RTLText option which produce a non-ordered arabic text (Randomized Arabic words not in the right direction),
Ok, I'll make a change in the RTL text detetion and I hope it will work better. The workaround for the current behaviour would be to change to the manual mode (button with the cog) and selecting RTL Text before writing the cell content.
the second problem is that the widget cannot wrap lines within its borders and will show the horizontal scroll bar in the bottom , in RtlText option.
This is configurable and it's the same for both widgets. There is button with a white page with text lines, which can be used to switch between scrolled lines or word wrapp.
@Johntaa, mixed Latin and Arabic texts should work now. Could you test and confirm? @justinclift, we would need another build of this branch.
@mgrojo : tested using sample database with both Latin and Arabic characters , working great. I don't see any problem. Thanks.
@justinclift Thank you.
Thanks, @Johntaa. Then I suppose this branch could be merged now, because the code is mostly recovered from previous versions with minor additions. I will wait till tomorrow, though, just in case someone would like to make a review.
mgrojo
deleted the
qt_ltr_text_editor
branch
mgrojo
restored the
qt_ltr_text_editor
branch
mgrojo
deleted the
qt_ltr_text_editor
branch