Closed
Bug 307396
Opened 21 years ago
Closed 21 years ago
Add IME selection colors and Underline height (nsILookAndFeel)
Categories
(Core :: Widget, defect, P1)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod, intl)
Attachments
(3 files)
|
28.16 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
|
7.26 KB,
patch
|
Details | Diff | Splinter Review | |
|
28.11 KB,
patch
|
Details | Diff | Splinter Review |
I need IME selection colors and Underline height for bug 113161 and bug 170951.
I will attach the patch.
| Assignee | ||
Updated•21 years ago
|
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
| Assignee | ||
Comment 1•21 years ago
|
||
| Assignee | ||
Comment 2•21 years ago
|
||
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)
| Assignee | ||
Updated•21 years ago
|
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+
Attachment #195173 -
Flags: review?(roc)
| Assignee | ||
Comment 4•21 years ago
|
||
(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.
| Assignee | ||
Comment 5•21 years ago
|
||
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
| Assignee | ||
Comment 6•21 years ago
|
||
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[] = { ... }?
Comment 8•21 years ago
|
||
(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
True. I hate ELF.
| Assignee | ||
Updated•16 years ago
|
Keywords: inputmethod
You need to log in
before you can comment on or make changes to this bug.
Description
•