refactor(ags): smol changes

This commit is contained in:
matt1432 2023-12-08 02:22:38 -05:00
parent 90b0f0e49d
commit 1ea4a2a77e
2 changed files with 12 additions and 16 deletions

View file

@ -1,4 +1,4 @@
import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
@ -16,18 +16,13 @@ Persist({
});
export default () => {
return EventBox({
onPrimaryClickRelease: () => {
HeartState.value = HeartState.value === '' ? '󰣐' : '';
},
export default () => EventBox({
onPrimaryClickRelease: () => {
HeartState.value = HeartState.value === '' ? '󰣐' : '';
},
child: Box({
className: 'heart-toggle',
child: Label({
binds: [['label', HeartState, 'value']],
}),
}),
});
};
child: Label({
className: 'heart-toggle',
binds: [['label', HeartState, 'value']],
}),
});

View file

@ -5,6 +5,7 @@ import { Box, EventBox, Icon, Label, Revealer } from 'resource:///com/github/Ayl
import Separator from '../../misc/separator.js';
const DEFAULT_KB = 'at-translated-set-2-keyboard';
const SPACING = 4;
export default () => {
@ -12,7 +13,7 @@ export default () => {
transition: 'slide_right',
child: Box({
children: [
Separator(4),
Separator(SPACING),
Label({
css: 'font-size: 20px;',
connections: [[Hyprland, (self, _n, layout) => {