зеркало из https://github.com/mozilla/gecko-dev.git
Implement CSS2 resize cursors on Windows (bug 1916)
This commit is contained in:
Родитель
2d4c0ff91a
Коммит
e406b651c3
|
@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock
|
|||
case NS_STYLE_CURSOR_E_RESIZE:
|
||||
c = eCursor_sizeWE;
|
||||
break;
|
||||
//We don't have cursors defined for these in nsIWidget. Need them to fix this.
|
||||
case NS_STYLE_CURSOR_NE_RESIZE:
|
||||
case NS_STYLE_CURSOR_NW_RESIZE:
|
||||
c = eCursor_sizeNW;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_SE_RESIZE:
|
||||
c = eCursor_sizeSE;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_NE_RESIZE:
|
||||
c = eCursor_sizeNE;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_SW_RESIZE:
|
||||
c = eCursor_select;
|
||||
c = eCursor_sizeSW;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1135,12 +1135,17 @@ nsEventStateManager::SetCursor(PRInt32 aCursor, nsIWidget* aWidget, PRBool aLock
|
|||
case NS_STYLE_CURSOR_E_RESIZE:
|
||||
c = eCursor_sizeWE;
|
||||
break;
|
||||
//We don't have cursors defined for these in nsIWidget. Need them to fix this.
|
||||
case NS_STYLE_CURSOR_NE_RESIZE:
|
||||
case NS_STYLE_CURSOR_NW_RESIZE:
|
||||
c = eCursor_sizeNW;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_SE_RESIZE:
|
||||
c = eCursor_sizeSE;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_NE_RESIZE:
|
||||
c = eCursor_sizeNE;
|
||||
break;
|
||||
case NS_STYLE_CURSOR_SW_RESIZE:
|
||||
c = eCursor_select;
|
||||
c = eCursor_sizeSW;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,6 +148,11 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
|
|||
eCursor_sizeWE,
|
||||
///(north/south sizing, usually rendered as sizeWE rotated 90 degrees)
|
||||
eCursor_sizeNS,
|
||||
///(corner sizing)
|
||||
eCursor_sizeNW,
|
||||
eCursor_sizeSE,
|
||||
eCursor_sizeNE,
|
||||
eCursor_sizeSW,
|
||||
eCursor_arrow_north,
|
||||
eCursor_arrow_north_plus,
|
||||
eCursor_arrow_south,
|
||||
|
|
|
@ -837,6 +837,13 @@ NS_IMETHODIMP nsWidget::SetCursor(nsCursor aCursor)
|
|||
newCursor = gdk_cursor_new(GDK_TCROSS);
|
||||
break;
|
||||
|
||||
case eCursor_sizeNW:
|
||||
case eCursor_sizeSE:
|
||||
case eCursor_sizeNE:
|
||||
case eCursor_sizeSW:
|
||||
// XXX: these resize cursors need to be implemented
|
||||
break;
|
||||
|
||||
case eCursor_arrow_south:
|
||||
case eCursor_arrow_south_plus:
|
||||
newCursor = gdk_cursor_new(GDK_BOTTOM_SIDE);
|
||||
|
|
|
@ -1621,6 +1621,16 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
|
|||
newCursor = ::LoadCursor(NULL, IDC_SIZENS);
|
||||
break;
|
||||
|
||||
case eCursor_sizeNW:
|
||||
case eCursor_sizeSE:
|
||||
newCursor = ::LoadCursor(NULL, IDC_SIZENWSE);
|
||||
break;
|
||||
|
||||
case eCursor_sizeNE:
|
||||
case eCursor_sizeSW:
|
||||
newCursor = ::LoadCursor(NULL, IDC_SIZENESW);
|
||||
break;
|
||||
|
||||
case eCursor_arrow_north:
|
||||
newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_ARROWNORTH));
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче