refactor(ags): change hover functions to avoid problems

This commit is contained in:
matt1432 2023-09-13 19:30:59 -04:00
parent fadf527d97
commit 0eb1d88999

View file

@ -7,8 +7,8 @@ export const Draggable = ({
maxOffset = 150,
startMargin = 0,
command = () => {},
addOnHover = w => {},
addOnHoverLost = w => {},
onHover = w => {},
onHoverLost = w => {},
child = '',
children = [],
...params
@ -17,11 +17,11 @@ export const Draggable = ({
...params,
onHover: box => {
box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));
addOnHover(box);
onHover(box);
},
onHoverLost: box => {
box.window.set_cursor(null);
addOnHoverLost(box);
onHoverLost(box);
},
});