Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2024, 01:08 PM   #46
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 784
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
Quote:
Originally Posted by KevinH View Post
Problem B is strange too. Why is it rendered so faintly? Is it because it is rendering an incomplete "composing string"? Is the colour meant to indicate it is incomplete?
This is exactly what I believe.
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?
BeckyEbook is offline   Reply With Quote
Old 10-28-2024, 01:15 PM   #47
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
@DiapDealer,
Can you recreate both problems A and B with your current setup?
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.
DiapDealer is offline   Reply With Quote
Advert
Old 10-28-2024, 01:15 PM   #48
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 10-28-2024, 03:25 PM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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;
}
But it makes no sense as it inverts the foreground and background colors and even adds an underline style.

What bothers me most is the ToDo comment ...
KevinH is offline   Reply With Quote
Old 10-29-2024, 01:38 PM   #50
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 11:04 PM.


MobileRead.com is a privately owned, operated and funded community.