mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-23 18:12:39 +00:00
feat: update system
This commit is contained in:
@@ -6,8 +6,8 @@ import * as Utils from "resource:///com/github/Aylur/ags/utils.js";
|
||||
* indicator?: import('types/widgets/box').BoxProps['child']
|
||||
* direction?: 'left' | 'right' | 'down' | 'up'
|
||||
* duration?: number
|
||||
* eventboxConnections?: import('types/widgets/box').BoxProps['connections']
|
||||
* connections?: import('types/widgets/revealer').RevealerProps['connections']
|
||||
* setupRevealer?: (rev: ReturnType<typeof Widget.Revealer>) => void
|
||||
* setupEventBox?: (rev: ReturnType<typeof Widget.EventBox>) => void
|
||||
* }} HoverRevealProps
|
||||
*/
|
||||
|
||||
@@ -19,9 +19,8 @@ export default ({
|
||||
child,
|
||||
direction = "left",
|
||||
duration = 300,
|
||||
connections = [],
|
||||
eventboxConnections = [],
|
||||
binds = [],
|
||||
setupEventBox,
|
||||
setupRevealer,
|
||||
...rest
|
||||
}) => {
|
||||
let open = false;
|
||||
@@ -31,15 +30,14 @@ export default ({
|
||||
|
||||
const revealer = Widget.Revealer({
|
||||
transition: `slide_${direction}`,
|
||||
connections,
|
||||
binds,
|
||||
setup: setupRevealer,
|
||||
transition_duration: duration,
|
||||
child,
|
||||
});
|
||||
|
||||
const eventbox = Widget.EventBox({
|
||||
...rest,
|
||||
connections: eventboxConnections,
|
||||
setup: setupEventBox,
|
||||
on_hover: () => {
|
||||
if (open) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user