View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0011599||Lazarus||IDE||public||2008-07-03 10:24||2013-09-03 12:07|
|Reporter||Graeme Geldenhuys||Assigned To||Zeljan Rikalo|
|Platform||x86||OS||Ubuntu Linux||OS Version||7.04|
|Product Version||0.9.25 (SVN)||Product Build||v0.9.25 r15471M i386-linux-qt|
|Target Version||Fixed in Version|
|Summary||0011599: Cursor in IDE editor is black|
|Description||The cursor in the editor is always black. I have the classic color scheme, so the cursor is really hard to see.|
|Tags||No tags attached.|
|Fixed in Revision||20603|
||Could this be related to 0011569 (which is under Windows, but otherwise sounds similar)?|
||I don't think it's related. My mouse cursor is fine, even when I Ctrl+Click (and it shows the hand cursor). It's the text cursor I'm talking about in the editor. See attached image - The black text cursor is in the pink circle.|
||Graeme, what do you suggest?|
Good question! :-) I can't see any colour property for the cursor in the Editor Options. Maybe we should add one? Or continue reading...
I switched colour themes to see what other themes do:
Cursor was placed in a blank (Space) area in the editor.
Default - cursor is black
Delphi - cursor is black
Pascal Classic - cursor is light yellow (not same as String colour)
Twilight - cursor is white
Ocean - cursor is light yellow (same as Pascal Classic)
So I tried to figure out where the cursor colour comes from. Playing around, I found that if I change the Space background colour and place the cursor in a Space area, the cursor colour changes. See Screenshot2.gif. On further investigation, it seems the cursor colour is a XOR of the whatever background it is on. Screenshot3.gif clearly shows this.
Under QT, it seems the cursor colour is hard coded to Black and not a XOR of the background colour—like GTK1 & GTK2 (and I believe Win32) does.
||you are not right about gtk. they are using hardcoded cursors color as I saw in their sources. try to create a GtkEntry (TEdit) and you will see if you change its color to dark blue your cursor is black as before.|
I was only referring to the Editor component (SynEdit) in Lazarus. I have no idea what they do in other components—but I agree that the black hard-coded colouring is wrong.
On a side note: fpGUI also uses XOR to draw the cursor - selection is another issue because XOR doesn't work well on anti-aliased characters. Cursor with XOR painting only touches the anti-aliased characters so is not a problem though.
||Also bad thing that qt4 doesnot supports raster operations. As result there is no xor :(|
gtk uses the theme colors. Synedit uses its own colors, so it must use its own colors for the cursor.
What is the advantage of gtk_draw_insertion_cursor?
IMO we should use the old code.
||We'll have raster ops inside qt4 as of qt 4.5.0|
Mattias, the only advantage is native gtk caret look. No others.
Zeljan, then it will be fixed a year after that qt release :)
||Actually CreateCaret can create specific cursor if we pass apropriate color/bitmap there. So it is not a problem to create caret in any desired color. I will implement that feature in widgetsets first and then we will add an option to the "editor options" dialog. I will do that in the 0.9.27 time.|
||Qt only issue at moment. We can postpone it.|
Note that this will not work with Qt < 4.5, since rasterOps are inside >= 4.5.
Now caret looks nice with all backgrounds.
|2008-07-03 10:24||Graeme Geldenhuys||New Issue|
|2008-07-03 10:24||Graeme Geldenhuys||Widgetset||=> QT|
|2008-07-03 11:07||Martin Friebe||Note Added: 0020516|
|2008-07-03 11:22||Graeme Geldenhuys||Note Added: 0020517|
|2008-07-03 11:22||Graeme Geldenhuys||File Added: black_cursor.gif|
|2008-07-04 07:59||Vincent Snijders||Status||new => assigned|
|2008-07-04 07:59||Vincent Snijders||Assigned To||=> Paul Ishenin|
|2008-08-20 03:46||Paul Ishenin||LazTarget||=> post 1.2|
|2008-08-20 03:46||Paul Ishenin||Note Added: 0021510|
|2008-08-20 03:46||Paul Ishenin||Status||assigned => feedback|
|2008-08-20 09:16||Graeme Geldenhuys||Note Added: 0021517|
|2008-08-20 09:16||Graeme Geldenhuys||File Added: Screenshot2.gif|
|2008-08-20 09:16||Graeme Geldenhuys||File Added: Screenshot3.gif|
|2008-08-20 11:39||Paul Ishenin||Note Added: 0021519|
|2008-08-20 12:28||Graeme Geldenhuys||Note Added: 0021522|
|2008-08-21 10:46||Paul Ishenin||Note Added: 0021554|
|2008-08-21 12:13||Mattias Gaertner||Note Added: 0021558|
|2008-08-21 14:15||Zeljan Rikalo||Note Added: 0021560|
|2008-08-21 16:06||Paul Ishenin||Note Added: 0021570|
|2008-08-21 16:09||Paul Ishenin||Note Added: 0021571|
|2008-08-21 16:10||Paul Ishenin||LazTarget||post 1.2 => 0.9.28|
|2008-08-21 16:10||Paul Ishenin||Widgetset||QT => GTK, GTK 2, QT|
|2008-08-21 16:10||Paul Ishenin||Status||feedback => assigned|
|2008-09-15 14:39||Vincent Snijders||Target Version||=> 0.9.27 (SVN)|
|2008-09-26 21:31||Vincent Snijders||Target Version||0.9.27 (SVN) => 0.9.28|
|2009-02-05 04:06||Paul Ishenin||Widgetset||GTK, GTK 2, QT => QT|
|2009-02-05 04:06||Paul Ishenin||Note Added: 0025127|
|2009-02-05 04:06||Paul Ishenin||LazTarget||0.9.28 => post 1.2|
|2009-02-05 04:07||Paul Ishenin||Status||assigned => confirmed|
|2009-02-05 04:07||Paul Ishenin||Target Version||0.9.28 =>|
|2009-02-05 04:07||Paul Ishenin||Assigned To||Paul Ishenin =>|
|2009-06-12 17:41||Zeljan Rikalo||Fixed in Revision||=> 20603|
|2009-06-12 17:41||Zeljan Rikalo||Status||confirmed => resolved|
|2009-06-12 17:41||Zeljan Rikalo||Resolution||open => fixed|
|2009-06-12 17:41||Zeljan Rikalo||Assigned To||=> Zeljan Rikalo|
|2009-06-12 17:41||Zeljan Rikalo||Note Added: 0028498|
|2009-10-23 00:40||Marc Weustink||Status||resolved => closed|
|2013-09-03 12:07||Martin Friebe||LazTarget||post 1.2 => 1.4|