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'; import Variable from 'resource:///com/github/Aylur/ags/variable.js';
@ -16,18 +16,13 @@ Persist({
}); });
export default () => { export default () => EventBox({
return EventBox({ onPrimaryClickRelease: () => {
onPrimaryClickRelease: () => { HeartState.value = HeartState.value === '' ? '󰣐' : '';
HeartState.value = HeartState.value === '' ? '󰣐' : ''; },
},
child: Box({ child: Label({
className: 'heart-toggle', className: 'heart-toggle',
binds: [['label', HeartState, 'value']],
child: Label({ }),
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'; import Separator from '../../misc/separator.js';
const DEFAULT_KB = 'at-translated-set-2-keyboard'; const DEFAULT_KB = 'at-translated-set-2-keyboard';
const SPACING = 4;
export default () => { export default () => {
@ -12,7 +13,7 @@ export default () => {
transition: 'slide_right', transition: 'slide_right',
child: Box({ child: Box({
children: [ children: [
Separator(4), Separator(SPACING),
Label({ Label({
css: 'font-size: 20px;', css: 'font-size: 20px;',
connections: [[Hyprland, (self, _n, layout) => { connections: [[Hyprland, (self, _n, layout) => {