Opened 15 years ago

Closed 15 years ago

Last modified 6 years 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
Version: 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 by sev-, 15 years ago

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

comment:2 by sev-, 15 years ago

Priority: normalhigh

comment:3 by fingolfin, 15 years ago

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

comment:4 by SF/vgvgf, 15 years ago

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 by SF/vgvgf, 15 years ago

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

comment:6 by lordhoto, 15 years ago

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 by lordhoto, 15 years ago

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

comment:8 by lordhoto, 15 years ago

Owner: set to lordhoto
Resolution: fixed
Status: newclosed

comment:9 by digitall, 6 years ago

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