awful: button reset on mouse leave
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
e871bbfa18
commit
0a74d9e127
|
@ -1600,6 +1600,7 @@ function widget.button(args)
|
||||||
local img_press = "<bg_margin top=\"2\" left=\"2\"/><bg image=\"" .. args.image .. "\" resize=\"true\"/>"
|
local img_press = "<bg_margin top=\"2\" left=\"2\"/><bg image=\"" .. args.image .. "\" resize=\"true\"/>"
|
||||||
w.text = img_release
|
w.text = img_release
|
||||||
w:buttons({ capi.button({}, 1, function () w.text = img_press end, function () w.text = img_release end) })
|
w:buttons({ capi.button({}, 1, function () w.text = img_press end, function () w.text = img_release end) })
|
||||||
|
function w.mouse_leave(s) w.text = img_release end
|
||||||
return w
|
return w
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue