Skip to content

Main menu menu to switch visibility without closing the window #11

Description

@regorxxx

Currently it's possible to Hide\show a window, but that involves actually closing the window. That affects JS scripts which can not run when "hidden" since there is no panel.

I have been working on a notification window + artwork which requires to be autohidden after a few seconds. As noted the problem is that calling the "Show" main menu actually closes the window, so on next track the panel is not running anymore and can not call "Show" again.

Image

It will replace the windows notification popup, which doesn't allow artwork.

Image

For ex.

addEventListener('on_playback_new_track', (metadb) => {
   const command = 'View/Flowin/Notification/Show';
   if (!fb.IsMainMenuCommandChecked(command)) { fb.RunMainMenuCommand(command); }
   setTimeout(() => fb.RunMainMenuCommand(command), timer); // After this no more JS is running since there is no panel so above code never works
});

I want to request a new menu entry which would really show/hide a panel without closing it. Maybe by altering the internal transparency. It would be placed below show for ex.

For ex. "Switch visibility". Which would automatically set transparency to 0 (unchecked) or to user defined transparency per window settings (checked).
Image

addEventListener('on_playback_new_track', (metadb) => {
   const command = 'View/Flowin/Notification/Switch visibility';
   if (!fb.IsMainMenuCommandChecked(command)) { fb.RunMainMenuCommand(command); } // When unchecked it's hidden, so show it
   setTimeout(() => fb.RunMainMenuCommand(command), timer); // And then after some seconds, hide it (but keep it running on background)
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions