Re: Insertion cursor drawing improvements



gtk-devel-list-request gnome org wrote:
> 
Owen said:

> Just found the following patch on one of my computers - I've had
> it sitting around for a few months. What it
> does is:
> 
>  - Make the insertion cursor draw with wider width for taller cursors

It looks to me as though this is still using a line thickness of 1, but
adding some arrow/stem lines.  I think that theming the line width is
better
for accessibility purposes, so I'd like to see that included.

>  - Adds small directional arrows when you have split
>    cursors to make it clear which cursor is which.
>  - Adds a "cursor_color" property to GtkTextView to match
>    the cursor_color property in GtkEntry.

That's handy.
 
> Possible questions:
> 
>  - Should _gtk_draw_insertion_cursor() be public? It's conceivable
>    that custom widgets or modified versions of
>    GtkEntry/GtkLabel/GtkTextView will need access to this function.
>    It's not really a normal gtk_draw_* function as it's not
>    virtualized in the style, takes a GdkGC as input, and so forth.

I guess the question is how consistent we want custom text widgets to
be, visually.  
 
>  - Does the cursor_gc addition to gtk_text_layout_draw() make sense?
>    The alternative would be to remove the "cursor_color" style
>    properties and add a global "cursor_color" setting.

A global cursor_gc (in GtkStyle) would facilitate the globalization of
cursor_color and also the line thickness themeability.  

Certainly a global cursor_color would be handy.  I was wrestling with
the
same thing regarding cursor line thickness, I didn't like the idea of
having separate properties on each text widget class.

-Bill
 
> Regards,
>                                         Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]