зеркало из https://github.com/mozilla/gecko-dev.git
Make page proxy hot spot fit the icon.
This commit is contained in:
Родитель
5854af95fa
Коммит
b49f293596
|
@ -382,6 +382,8 @@ XFE_DragBase::XFE_DragBase(Widget widget)
|
|||
_dragIconPixmapMask=None;
|
||||
_dragIconWidth=0;
|
||||
_dragIconHeight=0;
|
||||
_dragHotX=0;
|
||||
_dragHotY=0;
|
||||
|
||||
InitializeDisplayInfo(widget);
|
||||
|
||||
|
@ -515,6 +517,8 @@ void XFE_DragBase::dragInitialize()
|
|||
XtSetArg(args[n],XmNwidth,_dragIconData->width);n++;
|
||||
XtSetArg(args[n],XmNheight,_dragIconData->height);n++;
|
||||
XtSetArg(args[n],XmNpixmap,_dragIconPixmap);n++;
|
||||
XtSetArg(args[n],XmNhotX,_dragHotX);n++;
|
||||
XtSetArg(args[n],XmNhotY,_dragHotY);n++;
|
||||
if (_dragIconPixmapMask) {
|
||||
XtSetArg(args[n],XmNmask,_dragIconPixmapMask);n++;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,8 @@ protected:
|
|||
Pixmap _dragIconPixmapMask;
|
||||
unsigned int _dragIconWidth;
|
||||
unsigned int _dragIconHeight;
|
||||
unsigned int _dragHotX;
|
||||
unsigned int _dragHotY;
|
||||
|
||||
// drag methods
|
||||
void dragInitialize();
|
||||
|
|
|
@ -78,6 +78,9 @@ int XFE_LocationDrag::dragStart(int,int)
|
|||
if (isFileURL(_dragDataURL))
|
||||
dragFilesAsLinks(TRUE);
|
||||
|
||||
// Move the hot spot down to the pointy part of the icon.
|
||||
_dragHotY = 10;
|
||||
|
||||
setDragIcon(&LocationProxy);
|
||||
|
||||
return TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче