fix(ags): make revealers work on first try
This commit is contained in:
parent
5a609dc463
commit
0b4c525cf3
6 changed files with 22 additions and 28 deletions
|
@ -71,6 +71,7 @@ const CalendarWidget = () => Box({
|
||||||
export const Calendar = Window({
|
export const Calendar = Window({
|
||||||
name: 'calendar',
|
name: 'calendar',
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
|
popup: true,
|
||||||
anchor: 'top right',
|
anchor: 'top right',
|
||||||
margin: [ 8, 182, 0, 0],
|
margin: [ 8, 182, 0, 0],
|
||||||
child: PopUp({
|
child: PopUp({
|
||||||
|
|
|
@ -1,22 +1,10 @@
|
||||||
const { Revealer } = ags.Widget;
|
const { Revealer, Box } = ags.Widget;
|
||||||
const { closeWindow, openWindow } = ags.App;
|
const { openWindow } = ags.App;
|
||||||
|
|
||||||
export const PopUp = ({name, child, transition = 'slide_down', ...params}) => Revealer({
|
export const PopUp = ({name, child, transition = 'slide_down', ...params}) => Box({
|
||||||
|
style: 'min-height:1px; min-width:1px',
|
||||||
|
child: Revealer({
|
||||||
...params,
|
...params,
|
||||||
// FIXME: popups don't work with revealers
|
|
||||||
setup: () => {
|
|
||||||
setTimeout(() => {
|
|
||||||
closeWindow(name);
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
// my eyes hurt
|
|
||||||
if (name == 'overview') {
|
|
||||||
setTimeout(() => {
|
|
||||||
openWindow(name);
|
|
||||||
closeWindow(name);
|
|
||||||
}, 700);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
transition,
|
transition,
|
||||||
transitionDuration: 500,
|
transitionDuration: 500,
|
||||||
connections: [[ags.App, (revealer, currentName, visible) => {
|
connections: [[ags.App, (revealer, currentName, visible) => {
|
||||||
|
@ -28,4 +16,5 @@ export const PopUp = ({name, child, transition = 'slide_down', ...params}) => Re
|
||||||
}
|
}
|
||||||
}]],
|
}]],
|
||||||
child: child,
|
child: child,
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
@ -136,6 +136,7 @@ export const NotificationCenter = Window({
|
||||||
name: 'notification-center',
|
name: 'notification-center',
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
anchor: 'top right',
|
anchor: 'top right',
|
||||||
|
popup: true,
|
||||||
margin: [ 8, 60, 0, 0 ],
|
margin: [ 8, 60, 0, 0 ],
|
||||||
child: PopUp({
|
child: PopUp({
|
||||||
name: 'notification-center',
|
name: 'notification-center',
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { updateClients } from './clients.js';
|
||||||
export default Window({
|
export default Window({
|
||||||
name: 'overview',
|
name: 'overview',
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
|
popup: true,
|
||||||
|
|
||||||
child: PopUp({
|
child: PopUp({
|
||||||
name: 'overview',
|
name: 'overview',
|
||||||
|
|
|
@ -37,6 +37,7 @@ const PowermenuWidget = CenterBox({
|
||||||
|
|
||||||
export const Powermenu = Window({
|
export const Powermenu = Window({
|
||||||
name: 'powermenu',
|
name: 'powermenu',
|
||||||
|
popup: true,
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
child: PopUp({
|
child: PopUp({
|
||||||
name: 'powermenu',
|
name: 'powermenu',
|
||||||
|
|
|
@ -71,6 +71,7 @@ export const QuickSettings = Window({
|
||||||
name: 'quick-settings',
|
name: 'quick-settings',
|
||||||
layer: 'overlay',
|
layer: 'overlay',
|
||||||
anchor: 'top right',
|
anchor: 'top right',
|
||||||
|
popup: true,
|
||||||
margin: [ 8, 5, 0, ],
|
margin: [ 8, 5, 0, ],
|
||||||
child: PopUp({
|
child: PopUp({
|
||||||
name: 'quick-settings',
|
name: 'quick-settings',
|
||||||
|
|
Loading…
Reference in a new issue