10-28-2024, 01:08 PM | #46 | |
Guru
Posts: 784
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
Quote:
It's greyed out because it's in composing mode. The same situation occurs when you use the ‘soft keyboard’, which is a virtual keyboard for typing Hangul characters. But since Kovid somehow got around this, maybe it's worth asking him? |
|
10-28-2024, 01:15 PM | #47 |
Grand Sorcerer
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm fairly confused on the particulars of the problem(s) actually. I don't really see what I would describe as characters being "composed". I press a key with the Korean IME active and a glyph shows up in Code View. The last character typed is always more difficult to see, but not what I would call terribly distracting. So I'm guessing that's what most are complaining about. But then I'm currently using Qt6.7.3, so I may be seeing something different. I'll try going back to the official Sigil 2.3.1 and see what it looks like.
|
Advert | |
|
10-28-2024, 01:15 PM | #48 |
Sigil Developer
Posts: 8,188
Karma: 5450818
Join Date: Nov 2009
Device: many
|
I just checked his code view equivalent python code and I can see nothing specific to IME use in any way. He does strongly set the entire colour pallet for the editor unlike us, as we follow Windows colours. Perhaps there is a Qt pallet colour set aside for this.
Update: There really only is QPalette::Text, QPalette::BrightText and QPalette::WindowText. But there are InActive, and Disabled roles for them. I wonder which role is being used to indicate an incomplete composing string exists? Last edited by KevinH; 10-28-2024 at 02:32 PM. |
10-28-2024, 03:25 PM | #49 |
Sigil Developer
Posts: 8,188
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Okay I found the place in the Qt Windows specific code that sets the forground and background of the QInputMethodEvents:
It is here: qtbase/src/plugins/platforms/windows /qwindowsinputcontext.cpp The code in question is this routine: Code:
enum StandardFormat { PreeditFormat, SelectionFormat }; static inline QTextFormat standardFormat(StandardFormat format) { QTextCharFormat result; switch (format) { case PreeditFormat: result.setUnderlineStyle(QTextCharFormat::DashUnderline); break; case SelectionFormat: { // TODO: Should be that of the widget? const QPalette palette = QGuiApplication::palette(); const QColor background = palette.text().color(); result.setBackground(QBrush(background)); result.setForeground(palette.window()); break; } } return result; } What bothers me most is the ToDo comment ... |
10-29-2024, 01:38 PM | #50 |
Sigil Developer
Posts: 8,188
Karma: 5450818
Join Date: Nov 2009
Device: many
|
If anyone can recreate this, I could add an InputMethodEvent handler to CodeView and I could dump the QInputMethodEvent event parameters including the final commit string, the preeditString, and all the QTextFormat values passed in for each so we can understand what format is being specified for each. This may help us understand why the oreeditString is being greyed out for Korean.
BTW, this problem (both A and B) can not happen on Mac OS or even Linux as far as I can tell as they never set a preeditString. So this is specific to Windows and the Qt Windows specific code. Just let me know if anyine has time and I will throw something together. |
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issue with metadata input and searching | scarlettruin | Calibre | 4 | 03-26-2015 04:49 AM |
M92 Korean Input missing, notes application misbehaving | kie | Onyx Boox | 0 | 08-21-2012 12:39 PM |
html to epub - input issue | jwalk | Conversion | 4 | 06-07-2011 04:10 PM |
convert PDF input issue | Cid | Calibre | 2 | 01-08-2011 10:30 AM |
Korean schools to get digital text books | grimo1re | News | 2 | 01-26-2008 07:19 PM |