From 943e834af58bd5498b1fff70bf48c5ffe7764798 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 11 Sep 2023 15:55:16 -0400 Subject: [PATCH] feat(ags): make cursor blocked when button is disabled --- config/ags/js/common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/ags/js/common.js b/config/ags/js/common.js index e35c1c14..25094370 100644 --- a/config/ags/js/common.js +++ b/config/ags/js/common.js @@ -22,7 +22,12 @@ const display = Gdk.Display.get_default(); export const EventBox = ({ ...params }) => ags.Widget.EventBox({ ...params, onHover: box => { - box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'pointer')); + if (! box.child.sensitive || ! box.sensitive) { + box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'not-allowed')); + } + else { + box.window.set_cursor(Gdk.Cursor.new_from_name(display, 'pointer')); + } }, onHoverLost: box => { box.window.set_cursor(null);