refactor(ags): smol changes
This commit is contained in:
parent
a16d7d4748
commit
d6e0ad0022
2 changed files with 5 additions and 3 deletions
|
@ -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';
|
import Gdk from 'gi://Gdk';
|
||||||
const display = Gdk.Display.get_default();
|
const display = Gdk.Display.get_default();
|
||||||
|
@ -10,7 +10,7 @@ export default ({
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
if (!isButton) {
|
if (!isButton) {
|
||||||
return Widget.EventBox({
|
return EventBox({
|
||||||
...props,
|
...props,
|
||||||
onHover: self => {
|
onHover: self => {
|
||||||
if (!self.child.sensitive || !self.sensitive)
|
if (!self.child.sensitive || !self.sensitive)
|
||||||
|
@ -26,7 +26,7 @@ export default ({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Widget.Button({
|
return Button({
|
||||||
...props,
|
...props,
|
||||||
onHover: self => {
|
onHover: self => {
|
||||||
if (!self.child.sensitive || !self.sensitive)
|
if (!self.child.sensitive || !self.sensitive)
|
||||||
|
|
|
@ -4,6 +4,8 @@ import { Icon } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
import Gtk from 'gi://Gtk';
|
import Gtk from 'gi://Gtk';
|
||||||
import EventBox from '../misc/cursorbox.js';
|
import EventBox from '../misc/cursorbox.js';
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: use Widget.ToggleButton instead
|
||||||
export default () => {
|
export default () => {
|
||||||
const widget = EventBox({});
|
const widget = EventBox({});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue