fix(ags): clean up anim on wim
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
0ce1b48631
commit
a2283e5d6a
3 changed files with 20 additions and 14 deletions
|
@ -15,6 +15,7 @@ export default () => BarRevealer({
|
||||||
monitor: 1,
|
monitor: 1,
|
||||||
exclusivity: 'exclusive',
|
exclusivity: 'exclusive',
|
||||||
anchor: ['bottom', 'left', 'right'],
|
anchor: ['bottom', 'left', 'right'],
|
||||||
|
transition: 'slide_up',
|
||||||
bar: Box({
|
bar: Box({
|
||||||
vertical: true,
|
vertical: true,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -35,7 +35,7 @@ Hyprland.connect('event', (hyprObj) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ({ bar, monitor = 0, ...rest }) => {
|
export default ({ bar, transition, monitor = 0, ...rest }) => {
|
||||||
const BarVisible = Variable(true);
|
const BarVisible = Variable(true);
|
||||||
|
|
||||||
FullscreenState.connect('changed', (v) => {
|
FullscreenState.connect('changed', (v) => {
|
||||||
|
@ -76,6 +76,17 @@ export default ({ bar, monitor = 0, ...rest }) => {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const buffer = Box({
|
||||||
|
css: 'min-height: 10px',
|
||||||
|
visible: BarVisible.bind().as((v) => !v),
|
||||||
|
});
|
||||||
|
|
||||||
|
const rev = Revealer({
|
||||||
|
transition,
|
||||||
|
reveal_child: BarVisible.bind(),
|
||||||
|
child: bar,
|
||||||
|
});
|
||||||
|
|
||||||
return Window({
|
return Window({
|
||||||
name: `bar-${monitor}`,
|
name: `bar-${monitor}`,
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
|
@ -92,20 +103,13 @@ export default ({ bar, monitor = 0, ...rest }) => {
|
||||||
css: 'min-height: 1px; padding: 1px;',
|
css: 'min-height: 1px; padding: 1px;',
|
||||||
hexpand: true,
|
hexpand: true,
|
||||||
hpack: 'fill',
|
hpack: 'fill',
|
||||||
vertical: true,
|
vertical: transition === 'slide_up' ||
|
||||||
|
transition === 'slide_down',
|
||||||
|
|
||||||
children: [
|
children: transition === 'slide_up' ||
|
||||||
Box({
|
transition === 'slide_left' ?
|
||||||
css: 'min-height: 10px',
|
[buffer, rev] :
|
||||||
visible: BarVisible.bind().as((v) => !v),
|
[rev, buffer],
|
||||||
}),
|
|
||||||
|
|
||||||
Revealer({
|
|
||||||
transition: 'slide_up',
|
|
||||||
reveal_child: BarVisible.bind(),
|
|
||||||
child: bar,
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
}).on('enter-notify-event', () => {
|
}).on('enter-notify-event', () => {
|
||||||
if (!BarVisible.value) {
|
if (!BarVisible.value) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ const SPACING = 12;
|
||||||
export default () => BarRevealer({
|
export default () => BarRevealer({
|
||||||
anchor: ['top', 'left', 'right'],
|
anchor: ['top', 'left', 'right'],
|
||||||
exclusivity: 'exclusive',
|
exclusivity: 'exclusive',
|
||||||
|
transition: 'slide_down',
|
||||||
bar: CenterBox({
|
bar: CenterBox({
|
||||||
css: 'margin: 5px 5px 5px 5px',
|
css: 'margin: 5px 5px 5px 5px',
|
||||||
class_name: 'bar',
|
class_name: 'bar',
|
||||||
|
|
Loading…
Reference in a new issue