refactor(ags): smol changes

This commit is contained in:
matt1432 2023-11-06 21:41:30 -05:00
parent a16d7d4748
commit d6e0ad0022
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,4 @@
import { Widget } from 'resource:///com/github/Aylur/ags/widget.js';
import { Button, EventBox } from 'resource:///com/github/Aylur/ags/widget.js';
import Gdk from 'gi://Gdk';
const display = Gdk.Display.get_default();
@ -10,7 +10,7 @@ export default ({
...props
}) => {
if (!isButton) {
return Widget.EventBox({
return EventBox({
...props,
onHover: self => {
if (!self.child.sensitive || !self.sensitive)
@ -26,7 +26,7 @@ export default ({
});
}
else {
return Widget.Button({
return Button({
...props,
onHover: self => {
if (!self.child.sensitive || !self.sensitive)

View file

@ -4,6 +4,8 @@ import { Icon } from 'resource:///com/github/Aylur/ags/widget.js';
import Gtk from 'gi://Gtk';
import EventBox from '../misc/cursorbox.js';
// TODO: use Widget.ToggleButton instead
export default () => {
const widget = EventBox({});