Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Thanks Tomaž, yep I missed the GDK_CROSS on the gtk3 reference page
https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html

I am implementing *PointerStyle::FatCross* to be used to diplay a 'fat
cross' mouse cursor when hovering the spreadsheet grid. Up to this point, I
am only concerned with the GTK3 backend. So far I have done:

1. Expanded the *enum class PointerStyle *to include *FatCross           =
96, *in file /libreoffice/include/vcl/ptrstyle.hxx;

2. Changed line 53 of 'fudraw.cxx' from    *aNewPointer (
PointerStyle::Arrow ),* to

*aNewPointer ( PointerStyle::FatCross ), *
3. Added line *MAP_BUILTIN( PointerStyle::FatCross, GDK_CROSS );* to *GdkCursor
*GtkSalDisplay::getCursor( PointerStyle ePointerStyle )* on files
*gtkdata.cxx* and *gtk3gtkdata.cxx. *This should do the mapping of
*FatCross* from vcl to gtk3.

This changes will compile successfully. However, when I start LO-Calc and
hover over the cell grid area, the program crashes and displays an
'unexpected error'. My guess is that the *FatCross           = 96, *member
of *enum class PointerStyle* is not defined correctly. Any idea on what is
needed to define *FatCross*? How can I make the *FatCross* work in GTK3?

ps: As I said in the email I set earlier:

Basically the idea is to change the 'arrow' mouse icon into a 'fat cross'
when hovering over calc spreadsheet cell grid.

Preliminar investigation reveals that this behaviour can be well
approximated if line 53 of file fudraw.cxx is changed from
"   aNewPointer ( PointerStyle::Arrow )," change into "    aNewPointer (
PointerStyle::Cross ),"

However, the resulting cross looks a litle bit too thin and cannot be used
because it is the same mouse cursor used to drag equations around. This is
why I created a new PointerStyle::FatCross, so it is different from
PointerStyle::Cross, which is currently used to drag equations.


2017-02-06 9:42 GMT+00:00 Tomaž Vajngerl <quikee@gmail.com>:

Hi,

On Fri, Feb 3, 2017 at 10:12 AM, Nuno Ferreira <nuno360@gmail.com> wrote:
Another issue is the fact that GTK3+ does not seem to offer the fat cross
anymore, only the crosshair....
https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html. If this is
true
maybe we could use the crosshair when hovering over the grid of the
spreadsheet? Send a request to GTK team to include a fat cross on their
icon
set?

There is still GDK_CROSS and GDK_CROSSHAIR in the GdkCursorType enum
(on that same gtk3 reference page). Maybe you missed that? I guess you
can't create the cursor with gdk_cursor_new_from_name and have to use
gdk_cursor_new which accepts a GdkCursorType enum.

Anyway gtk3 is only one of the back-ends :)

Thanks,
Nuno

Regards, Tomaž


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.