Closed Bug 126066 Opened 23 years ago Closed 20 years ago

Changing caret (cursor) color

Categories

(Core Graveyard :: GFX: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ibelooze, Assigned: pkwarren)

Details

Attachments

(4 files, 2 obsolete files)

When I compose messages in a window, such as replying in a forum, the cursor is nearly invisible, it is a shade darker than white with no apparent way to adjust it. Also would like to make the cursor a block one instead of the vertical line like it is now. Or at least the same color as the text, like in Netscape 4.6.
Assuming you mean the caret: Are you using a GTK themes? Does the caret color change if you change to another theme? Please also include Mozilla build ID. WFM, current CVS Linux, GTK theme "Raleigh": Caret blinks white/black, easy to see.
Esther/nbaca, can you reproduce?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
-->selection I recommend this bug be resolved as invalid unless we get more information such as build ID, OS version / (windowing software), etc.
Assignee: syd → mjudge
Status: ASSIGNED → NEW
Component: Editor: Composer → Selection
QA Contact: sujay → pmac
Summary: Changing cursor color → Changing caret (cursor) color
I have the same (or a very similiar) problem. In the the URL input field, in HTML input fields and in mail composing the curser blinks in a very light gray (on white background), so it is nearly invisible. I use 1.1 and 1.2.1 on Linux with the classic theme. The X Server (on an NCD X Terminal) runs in PseudoColor, so I guess that Mozilla didn't find enough free entries in the color palette. At least the real black that is used for text should be available, so the fallback should go to this color. (I use Debian GNU/Linux and its Mozilla Package 1.2.1-8)
I'm getting this same bug running Mozilla 1.2.1 on FreeBDS (Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030227). In textboxes and the location bar, the caret is almost invisible- simply a very light shade of gray. I'm running Sawfish and using the MicroGUI theme. OS is FreeBSD 4.7-Release
Assignee: mjudge → blizzard
Component: Selection → GFX: Gtk
QA Contact: pmac → ian
Target Milestone: Future → ---
This bug is also very easy to reproduce on AIX machines with low color displays. The color of the text cursor is drawn in either a light gray or light yellow color, and this also causes several problems with highlighted text, like in a XIM preedit string. I was able to get better behavior by changing the GDK function from GDK_INVERT to GDK_XOR in nsRenderingContextGTK::InvertRect(), however this is the opposite of the change made in Bug 17968.
The screen shot in Bug 17968 (http://bugzilla.mozilla.org/attachment.cgi?id=6473&action=view) shouldn't occur with normal selected text today because we are using DrawSelectionIterator in nsTextFrame to ensure that multiply selected text is displayed with the correct contrasting colors. This is not being done for the caret cursor or any of the XIM selection styles however (SELECTION_IME_SELECTEDRAWTEXT, SELECTION_IME_RAWINPUT, SELECTION_IME_SELECTEDCONVERTEDTEXT, SELECTION_IME_CONVERTEDTEXT).
Attached patch Patch v1 (obsolete) — Splinter Review
This changes the GDK function used in InvertRect back to GDK_XOR. This should be a relatively harmless fix (as InvertRect is no longer used for regular selected text), and it seems to improve the contrast of the text cursor/background and XIM selected text on low color displays.
Assignee: blizzard → pkw
Status: NEW → ASSIGNED
Attachment #148537 - Flags: superreview?(blizzard)
Attachment #148537 - Flags: review?(tor)
Attachment #148537 - Flags: review?(tor) → review+
Can you give me a quick screenshot of the difference?
Attached image GDK_INVERT screenshot
Attached image GDK_XOR screenshot
The GDK_INVERT behavior gets much worse if more applications are open. In this screenshot, it is not horrible but the GDK_XOR contrast is much better. With more applications open, the GDK_INVERT may choose a light yellow background and a white foreground, which is almost impossible to see.
Attachment #148537 - Flags: superreview?(blizzard) → superreview+
Fixed. Checking in nsRenderingContextGTK.cpp; /cvsroot/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp,v <-- nsRenderingContextGTK.cpp new revision: 1.182; previous revision: 1.181 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I backed out this fix because I found that it broke displaying of -moz-outline: invert.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file -moz-outline testcase
Philip K. Warren (IBM) wrote: > I backed out this fix because I found that it broke displaying of > -moz-outline: invert. What about adding a new method to nsIRenderingContext which implements the XOR functionality (and falls back to "invert" when the specific platform has no special implementation for that) ?
Attachment #148537 - Attachment is obsolete: true
Attached patch Patch v2 (obsolete) — Splinter Review
This fixes the problem with the -moz-outline: invert usage, and still provides the benefits of increased contrast between IME selected text and the cursor on low color displays.
Attachment #151461 - Flags: superreview?(dbaron)
Attachment #151461 - Flags: review?(tor)
Comment on attachment 151461 [details] [diff] [review] Patch v2 InvertRect should just invert the rect. It shouldn't depend on the current color. nsRenderingContextGTK::InvertRect should be fixed so saves and restores the current color if that matters (and likewise for any other implementations).
Attachment #151461 - Flags: superreview?(dbaron) → superreview-
Attachment #151461 - Flags: review?(tor)
Attachment #151461 - Attachment is obsolete: true
Attached patch Patch v3Splinter Review
Attachment #151483 - Flags: review?(tor)
Attachment #151483 - Flags: superreview?(dbaron)
Attachment #151483 - Flags: superreview?(dbaron) → superreview+
Attachment #151483 - Flags: review?(tor) → review+
Latest patch checked in. Marking fixed. Checking in gtk/nsRenderingContextGTK.cpp; /cvsroot/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp,v <-- nsRenderingContextGTK.cpp new revision: 1.184; previous revision: 1.183 done Checking in xlib/nsRenderingContextXlib.cpp; /cvsroot/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp,v <-- nsRenderingContextXlib.cpp new revision: 1.103; previous revision: 1.102 done
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: