Opened 9 years ago

Closed 9 years ago

Last modified 7 months ago

#4768 closed defect (fixed)

GUI: Caret blink shaves pixels from the letter underneath

Reported by: salty-horse Owned by: lordhoto
Priority: high Component: GUI
Keywords: Cc:
Game:

Description

Using latext svn.

In editable text fields, when the caret is drawn and then erased after a moment, the character below it loses a few pixels.
Moving the caret causes redraw of the entire text, so it's only noticeable if you look carefully.

It is visible with most, if not all, lowercase characters and some uppercase ones (such as 'A').
The other characters don't have enough pixels on their first column to be erased.

Ticket imported from: #2951681. Ticket imported from: bugs/4768.

Change History (9)

comment:1 Changed 9 years ago by sev-

This bug is nice to get fixed before the release. Raising priority for keeping the track.

comment:2 Changed 9 years ago by sev-

Priority: normalhigh

comment:3 Changed 9 years ago by fingolfin

Summary: Caret blink shaves pixels from the letter underneathGUI: Caret blink shaves pixels from the letter underneath

comment:4 Changed 9 years ago by SF/vgvgf

Here is a patch for this bug: http://pastebin.org/130566

The problem is in ThemeEngine::drawCaret and EditableWidget::drawCaret. When erasing the cursor caret, ThemeEngine::drawCaret only restore the background of the widget but not the text.
My solution is to draw again the char affected by the cursor in EditableWidget::drawCaret after the background was restored. This way the text is restored when the cursor blinks.

comment:5 Changed 9 years ago by SF/vgvgf

Mmm, the patch won't work if the text is scrolled. I'll fix that and submit another patch soon.

comment:6 Changed 9 years ago by lordhoto

Please do not post patches like that. Create a separate item on the patch tracker for that. And since I guess that's your patch for your GSoC application also mark it with "GSoC:" at the beginning of the title and link it from your application.

comment:7 Changed 9 years ago by lordhoto

Fixed by committing patch #2980691 (http://sf.net/support/tracker.php?aid=2980691)

comment:8 Changed 9 years ago by lordhoto

Owner: set to lordhoto
Resolution: fixed
Status: newclosed

comment:9 Changed 7 months ago by digitall

Component: GUI
Note: See TracTickets for help on using tickets.