Closed Bug 307396 Opened 21 years ago Closed 21 years ago

Add IME selection colors and Underline height (nsILookAndFeel)

Categories

(Core :: Widget, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod, intl)

Attachments

(3 files)

I need IME selection colors and Underline height for bug 113161 and bug 170951. I will attach the patch.
Status: NEW → ASSIGNED
Priority: -- → P1
Summary: Add IME selection colors and Underline height → Add IME selection colors and Underline height (nsILookAndFeel)
Target Milestone: --- → mozilla1.9alpha
We need following status's foreground and background colors: See http://lxr.mozilla.org/seamonkey/source/content/base/public/nsISelectionController.idl#57 nsISelectionController::SELECTION_IME_SELECTEDRAWTEXT nsISelectionController::SELECTION_IME_SELECTEDCONVERTEDTEXT nsISelectionController::SELECTION_IME_RAWINPUT nsISelectionController::SELECTION_IME_CONVERTEDTEXT And underline's height magnification. See http://lxr.mozilla.org/seamonkey/source/layout/generic/nsTextFrame.cpp#2142 2142 #ifdef XP_MACOSX // underline thicness is 2 pixel 2143 aRenderingContext.FillRect(aX + startOffset+size, aY + baseline - offset, textWidth-2*size, 2*size); 2144 #else 2145 aRenderingContext.FillRect(aX + startOffset+size, aY + baseline - offset, textWidth-2*size, size); 2146 #endif
Attachment #195173 - Flags: review?(roc)
Attachment #195173 - Attachment description: Patch rv1.0 → Patch rv1.0 (widget/public, widget/src/xpwidgets)
Comment on attachment 195171 [details] [diff] [review] Patch rv1.0 -const char nsXPLookAndFeel::sColorPrefs[][36] = +const char nsXPLookAndFeel::sColorPrefs[][38] = You want 48, not 38. I'm not show how this compiled.
Attachment #195171 - Flags: superreview+
Attachment #195171 - Flags: review+
(In reply to comment #3) > (From update of attachment 195171 [details] [diff] [review] [edit]) > -const char nsXPLookAndFeel::sColorPrefs[][36] = > +const char nsXPLookAndFeel::sColorPrefs[][38] = > > You want 48, not 38. I'm not show how this compiled. > Why 48? Most long member is "ui.IMESelectedConvertedTextBackground". This is 37 charcters.
O.K. I understand. You may understand that the index is prefs count. It's not so. It is string length of each items. 38 is enough for current patch. Therefore, I checked-in. -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You're right. That was my mistake. I'm not sure why this code is like that. Couldn't it be written const char* nsXPLookAndFeel::sColorPrefs[] = { ... }?
(In reply to comment #7) > I'm not sure why this code is like that. Couldn't it be written > > const char* nsXPLookAndFeel::sColorPrefs[] = { ... }? that's less efficient per http://people.redhat.com/drepper/dsohowto.pdf 2.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: