refactor(ags): change hover functions to avoid problems
This commit is contained in:
parent
fadf527d97
commit
0eb1d88999
1 changed files with 4 additions and 4 deletions
|
@ -7,8 +7,8 @@ export const Draggable = ({
|
||||||
maxOffset = 150,
|
maxOffset = 150,
|
||||||
startMargin = 0,
|
startMargin = 0,
|
||||||
command = () => {},
|
command = () => {},
|
||||||
addOnHover = w => {},
|
onHover = w => {},
|
||||||
addOnHoverLost = w => {},
|
onHoverLost = w => {},
|
||||||
child = '',
|
child = '',
|
||||||
children = [],
|
children = [],
|
||||||
...params
|
...params
|
||||||
|
@ -17,11 +17,11 @@ export const Draggable = ({
|
||||||
...params,
|
...params,
|
||||||
onHover: box => {
|
onHover: box => {
|
||||||
box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));
|
box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));
|
||||||
addOnHover(box);
|
onHover(box);
|
||||||
},
|
},
|
||||||
onHoverLost: box => {
|
onHoverLost: box => {
|
||||||
box.window.set_cursor(null);
|
box.window.set_cursor(null);
|
||||||
addOnHoverLost(box);
|
onHoverLost(box);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue