Bug 608966 - uncommitted text color is not properly set in kwrite
uncommitted text color is not properly set in kwrite
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ibus-qt (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: fujiwara
QE Internationalization Bugs
:
: 613520 (view as bug list)
Depends On: 616277
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-29 00:03 EDT by Kenichi Takemura
Modified: 2014-08-04 18:02 EDT (History)
5 users (show)

See Also:
Fixed In Version: ibus-qt-1.3.0-2.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 616277 (view as bug list)
Environment:
Last Closed: 2010-07-29 02:54:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot when I type "rlagrlagrla" with ibus-hangul on kwrite (5.47 KB, image/png)
2010-06-29 03:46 EDT, Daiki Ueno
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
KDE Software Compilation 241085 None None None Never

  None (edit)
Description Kenichi Takemura 2010-06-29 00:03:52 EDT
Description of problem:
A Hangul character entered by using iBus with Korean Input method in kwrite application is displayed in white colour text before pressing space or enter or next character.
If space or enter key is pressed or next character is typed, it appears in black colour.

Version-Release number of selected component (if applicable):

kdebase-4.3.4-4.el6.x86_64
ibus-hangul-1.3.0.20100329-1.el6.x86_64
ibus-1.3.3-1.el6.x86_64

How reproducible:

Every time

Steps to Reproduce:
1.Install kdebase by yum
2.Launch kwrite
3.Turn iBus on in kwrite
4.Type a hangul
  
Actual results:

A hangul character is in white font colour which is hard to see.

Expected results:

A hangul character is in default font colour(black)

Additional info:

Entering English or Japanese in kwrite works fine for this problem.
Comment 2 RHEL Product and Program Management 2010-06-29 00:22:53 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Daiki Ueno 2010-06-29 03:44:49 EDT
I can reproduce it even on Fedora 13, if ibus-qt is installed (screenshot attached).  ibus-hangul uses white/black (fg/bg) for preedit text and requests these settings to applications via ibus-qt.  However, the KTextEdit control (which kwrite uses) overrides the bg setting.

The solution would be to make KTextEdit (kdelibs) not overwrite existing text attributes, but it might not be easy.  Another solution is to choose reasonable default colors for ibus-hangul preedit as in other IME.
Comment 4 Daiki Ueno 2010-06-29 03:46:54 EDT
Created attachment 427599 [details]
screenshot when I type "rlagrlagrla" with ibus-hangul on kwrite
Comment 5 Pravin Satpute 2010-07-12 02:42:23 EDT
same problem is occurring in ibus-rawcode as well
see https://bugzilla.redhat.com/show_bug.cgi?id=613520

i think we should fix this from ibus-qt side, so will no need to change all ime-engine's code
Comment 6 fujiwara 2010-07-13 01:57:58 EDT
rf. https://bugs.kde.org/show_bug.cgi?id=241085
Comment 8 fujiwara 2010-07-16 05:10:25 EDT
I could reproduce this problem.
I almost understood the root cause. Will update the evaluation later.
Comment 9 Pravin Satpute 2010-07-16 06:30:35 EDT
I just saw on fedora 13 with kdebase 4.4.5-1, this problem is not coming. 
Tested for ibus-rawcode
Comment 12 fujiwara 2010-07-19 21:31:12 EDT
(In reply to comment #9)
> I just saw on fedora 13 with kdebase 4.4.5-1, this problem is not coming. 
> Tested for ibus-rawcode    

I can reproduce the same bug in f13 kdebase 4.4.5-1 and f14.


ibus-hangul's engine sets foreground is white and background is black.
The problem is, the foreground color only is set in the actual preedit GUI but the background color is lost and this causes both the foreground and the background color are white and users cannot read the preedit text.

kdelibs-4.3.4/kate/render/katerenderer.cpp:

QList<QTextLayout::FormatRange> KateRenderer::decorationsForLine( const KateTextLine::Ptr& textLine, int line, bool selectionsOnly, KateRenderRange* completionHighlight, bool completionSelected ) const
{
        fr.format = *a;
}


It seems kde kate rendering get one format only.
But ibus-qt sends multiple formats with QAttribute.

The solution is ibus-qt has one format only and it can have both foreground and background colors.

The suggested patch:
http://github.com/fujiwarat/ibus-qt/commit/5fa9738dc4147f11abc420efc217c4c6e7029b77
Comment 14 fujiwara 2010-07-22 23:33:15 EDT
Integrated the same fix in fedora rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2345562
Comment 15 Pravin Satpute 2010-07-23 01:20:37 EDT
i have tested  
F13 Build
http://koji.fedoraproject.org/koji/taskinfo?taskID=2346026  on RHEL6

It is resolving problem of ibus-rawcode on RHEL6
thanks fujuwara
Comment 17 Jens Petersen 2010-07-27 02:17:50 EDT
*** Bug 613520 has been marked as a duplicate of this bug. ***
Comment 19 fujiwara 2010-07-27 21:31:11 EDT
Integrated the fix.
Comment 22 Kenichi Takemura 2010-07-29 02:54:18 EDT
Verified in kwrite with all supported input method

tree:RHEL6.0-20100728.1
ibus-qt-1.3.0-2.el6

Note You need to log in before you can comment on or make changes to this bug.