After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655491 - Text cursor/caret theming
Text cursor/caret theming
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: ClutterText
git master
Other Linux
: Normal enhancement
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-28 11:00 UTC by Allan Day
Modified: 2021-06-10 11:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
text input screenshots (69.66 KB, image/png)
2012-03-06 11:52 UTC, Allan Day
Details

Description Allan Day 2011-07-28 11:00:17 UTC
The cursor is too faint in the overview search box and too strong in dialog boxes. It is oddly aligned in both.

The text cursor should:

 * Be the same colour as the text that is inputted.

 * Be vertically centred so that it appears in the middle of the text box (and it should not touch or overlap the edges of the text box).

 * Blink.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-11-11 22:47:57 UTC
This is a bug in ClutterText, punting to them.
Comment 2 Emmanuele Bassi (:ebassi) 2012-03-06 00:36:42 UTC
- the colors are set by the user; by default, the cursor uses the same color as the text.

- the cursor size currently maps the PangoLayout, but I'd accept patches to make it work better.

- a blinking cursor is a bit trickier; it may mean causing a redraw of a lot of actors to have a 2-by-font_size rectangle to blink. again, I'd accept patches, but I'd also love to see some profiling before accepting them.
Comment 3 Allan Day 2012-03-06 11:52:26 UTC
Created attachment 209075 [details]
text input screenshots

The main issue here is the alignment and dimensions of the caret (honestly, I'm not sure how important or desirable the blinking behaviour is). I've attached some screenshots which illustrate the issue - you can see that the caret isn't vertically centered against the text.
Comment 4 Emmanuele Bassi (:ebassi) 2012-03-06 15:12:33 UTC
I just pushed the commit:

commit 663d6179ffdb27ef25ee67e4b7d2e05a5d1216aa
Author: Emmanuele Bassi <ebassi@linux.intel.com>
Date:   Tue Mar 6 15:05:36 2012 +0000

    text: Center the cursor caret
    
    We remove 2 pixels from the height of the cursor, but we should also
    remove the same amount from the position on the y axis, so that the
    cursor caret appears centered in the allocated height.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655491

Which should at least alleviate the caret centering issue; unlike GTK+, ClutterText does not have a bunch of properties to control the sizing with regard to the caret, text layout, and internal padding, so we may need to add more API to ClutterText to allow St to control the appearances of StEntries.
Comment 5 André Klapper 2021-06-10 11:32:11 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of clutter, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a ticket at
  https://gitlab.gnome.org/GNOME/clutter/-/issues/

Thank you for your understanding and your help.