Community
Participate
Working Groups
Created attachment 192596 [details] Patch for 1.4 release This issue arises because Draw2d uses these styles for resizing figures. Currently these SWT constants are missing: /** * System resize north-east-south-west cursor (value is 6). */ public static final int CURSOR_SIZENESW = 6; /** * System resize north-west-south-east cursor (value is 8). */ public static final int CURSOR_SIZENWSE = 8; ---------------- There is a partial implementation already in place in the code for supporting these cursors. It seems like it may not be supported across all browsers. Does anyone have a reason why this partial implementation exists? Since we are at API freeze, I would like to propose the attached patch to allow support of the cursors in 1.4 with the Draw2d implementation. After the final release we should add these officially.
Visually I don't see any difference between CURSOR_SIZENWSE and CURSOR_SIZENW, CURSOR_SIZENESW and CURSOR_SIZENE. As cursors CURSOR_SIZENW and CURSOR_SIZENE exist in RAP the fix will be to simple map these new cursors to the existing one.
Fixed in CVS HEAD. Now CURSOR_SIZENWSE and CURSOR_SIZENW are rendered as "nw-resize", CURSOR_SIZENESW and CURSOR_SIZENE as "ne-resize".
The problem is on Linux/GTK they have different cursors for each corner. See this page http://www.pygtk.org/docs/pygtk/class-gdkcursor.html for what they actually look like. It looks like SWT on GTK maps SIZENESW and SIZENWSE to GDK_SIZING which looks more or less like the cursor used on Windows and presumably other platforms.
I think the only way to handle this properly is with a custom cursor. I was tracing through the javascript code last week and it looked like the support was there to load a custom cursor, all that would be required is to register a static resource with qooxdoo. If we don't go with the custom cursor I would recommend using "crosshair" to avoid the issue with Linux. If the other platforms all use the same cursors for ne-resize/sw-resize and nw-resize/se-resize, then there should at least be a custom case for Linux like is already there for IE and Opera.
Cole, there is no custom case for IE and Opera (if you refer the Widget.js)... "nesw-resize" is mapped to "ne-resize" and "nwse-resize" to "nw-resize". This is exactly what the current implementation does. By respecting the Windows cursors we are cross-browsers compliant as well. If we have to respect the Linux cursors, we have to provide six custom cursors - four for all different corners + two for nwse and nesw sizing.
So far, we consider RAP to be a 'platform' of its own. Apart from some allowances for specific Mac keys, RAP behaves much the same regardless on which OS/WS the browser runs. To me, it seems too much of an effort to handle those rather exotic cursor shapes differently on different platforms. Does that make sense? Can you live with that?
(In reply to comment #6) > So far, we consider RAP to be a 'platform' of its own. Apart from some > allowances for specific Mac keys, RAP behaves much the same regardless on which > OS/WS the browser runs. > To me, it seems too much of an effort to handle those rather exotic cursor > shapes differently on different platforms. > Does that make sense? Can you live with that? I can understand that, and that would be fine. I'm not even really sure what the use-case for those cursor types would be. The best way to handle "exotic" cursor shapes is probably to have custom images like the up_arrow. That way they could be themed if the user wanted something different. However until I see a valid use-case for even using these cursor types, I don't see much use in adding them.