Bug 500914. Use GTK2 theme cursor instead of built-in cursor for column and row resizers. r=roc

This commit is contained in:
Michael Ventnor 2009-07-04 22:03:16 +12:00
parent c665d04b4e
commit c2d98e564e
2 changed files with 3 additions and 65 deletions

View File

@ -291,60 +291,6 @@ static const unsigned char moz_not_allowed_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
/* MOZ_CURSOR_COL_RESIZE */
static const unsigned char moz_col_resize_bits[] = {
0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
0x00, 0x05, 0x00, 0x00, 0x10, 0x45, 0x00, 0x00, 0x18, 0xc5, 0x00, 0x00,
0x1c, 0xc5, 0x01, 0x00, 0x7e, 0xf5, 0x03, 0x00, 0x1c, 0xc5, 0x01, 0x00,
0x18, 0xc5, 0x00, 0x00, 0x10, 0x45, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const unsigned char moz_col_resize_mask_bits[] = {
0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00,
0x90, 0x4f, 0x00, 0x00, 0xb8, 0xef, 0x00, 0x00, 0xbc, 0xef, 0x01, 0x00,
0xbe, 0xef, 0x03, 0x00, 0xff, 0xff, 0x07, 0x00, 0xbe, 0xef, 0x03, 0x00,
0xbc, 0xef, 0x01, 0x00, 0xb8, 0xef, 0x00, 0x00, 0x90, 0x4f, 0x00, 0x00,
0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
/* MOZ_CURSOR_ROW_RESIZE */
static const unsigned char moz_row_resize_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
0xe0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00,
0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const unsigned char moz_row_resize_mask_bits[] = {
0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00,
0xf0, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00,
0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00,
0xf0, 0x07, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
/* MOZ_CURSOR_VERTICAL_TEXT */
static const unsigned char moz_vertical_text_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
@ -463,15 +409,13 @@ enum {
MOZ_CURSOR_ZOOM_IN,
MOZ_CURSOR_ZOOM_OUT,
MOZ_CURSOR_NOT_ALLOWED,
MOZ_CURSOR_COL_RESIZE,
MOZ_CURSOR_ROW_RESIZE,
MOZ_CURSOR_VERTICAL_TEXT,
MOZ_CURSOR_NESW_RESIZE,
MOZ_CURSOR_NWSE_RESIZE,
MOZ_CURSOR_NONE
};
// create custom pixmap cursor from cursors in nsGTKCursorData.h
// create custom pixmap cursor
static const nsGtkCursor GtkCursors[] = {
{ moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10 },
{ moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10 },
@ -482,8 +426,6 @@ static const nsGtkCursor GtkCursors[] = {
{ moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6 },
{ moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6 },
{ moz_not_allowed_bits, moz_not_allowed_mask_bits, 9, 9 },
{ moz_col_resize_bits, moz_col_resize_mask_bits, 9, 7 },
{ moz_row_resize_bits, moz_row_resize_mask_bits, 7, 9 },
{ moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4 },
{ moz_nesw_resize_bits, moz_nesw_resize_mask_bits, 8, 8 },
{ moz_nwse_resize_bits, moz_nwse_resize_mask_bits, 8, 8 },

View File

@ -5225,12 +5225,6 @@ get_gtk_cursor(nsCursor aCursor)
case eCursor_no_drop:
newType = MOZ_CURSOR_NOT_ALLOWED;
break;
case eCursor_col_resize:
newType = MOZ_CURSOR_COL_RESIZE;
break;
case eCursor_row_resize:
newType = MOZ_CURSOR_ROW_RESIZE;
break;
case eCursor_vertical_text:
newType = MOZ_CURSOR_VERTICAL_TEXT;
break;
@ -5244,9 +5238,11 @@ get_gtk_cursor(nsCursor aCursor)
newType = MOZ_CURSOR_NWSE_RESIZE;
break;
case eCursor_ns_resize:
case eCursor_row_resize:
gdkcursor = gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW);
break;
case eCursor_ew_resize:
case eCursor_col_resize:
gdkcursor = gdk_cursor_new(GDK_SB_H_DOUBLE_ARROW);
break;
case eCursor_none: