Release Kaleido Desktop 0.1.0-beta.12
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
On Windows the miniplayer is now a window of its own (mini.rs, mini.html): a borderless window owned by the main one that the video moves into (VideoSurface::set_host swaps composition targets in one commit). Dragging moves the whole window, so video and controls move together with no edge flicker; release glides it to the nearest corner or the one it's flicked towards, remembered, and it follows the main window. Its page mirrors the player over events (mini:state / mini:action). Shown and hidden natively without activation, so the main window keeps focus. macOS keeps the in-page miniplayer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c3d2f4b6a7
commit
8ed44c2fe4
22 changed files with 871 additions and 26 deletions
|
|
@ -1,5 +1,6 @@
|
|||
mod diagnostics;
|
||||
mod downloads;
|
||||
mod mini;
|
||||
mod mpv;
|
||||
mod platform;
|
||||
mod player;
|
||||
|
|
@ -16,6 +17,8 @@ pub fn run() {
|
|||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
// The miniplayer window is always placed from the main window (mini.rs).
|
||||
.with_denylist(&["mini"])
|
||||
.with_state_flags(
|
||||
tauri_plugin_window_state::StateFlags::SIZE
|
||||
| tauri_plugin_window_state::StateFlags::POSITION
|
||||
|
|
@ -24,6 +27,7 @@ pub fn run() {
|
|||
.build(),
|
||||
)
|
||||
.manage(player::PlayerState::default())
|
||||
.manage(mini::MiniState::default())
|
||||
.manage(downloads::Downloads::default())
|
||||
.setup(|app| {
|
||||
let handle = app.handle().clone();
|
||||
|
|
@ -32,6 +36,10 @@ pub fn run() {
|
|||
if let Some(window) = app.get_webview_window("main") {
|
||||
let w = window.clone();
|
||||
window.on_window_event(move |event| {
|
||||
// On the UI thread: places the miniplayer window without waiting on anything.
|
||||
if let WindowEvent::Moved(_) | WindowEvent::Resized(_) | WindowEvent::ScaleFactorChanged { .. } = event {
|
||||
mini::follow_main(&w);
|
||||
}
|
||||
if let WindowEvent::Resized(_) | WindowEvent::ScaleFactorChanged { .. } = event {
|
||||
// Never on the UI thread: the player's locks may be held by a
|
||||
// command that is itself waiting on the UI thread (see player.rs).
|
||||
|
|
@ -65,6 +73,11 @@ pub fn run() {
|
|||
downloads::download_list,
|
||||
downloads::download_set_dir,
|
||||
downloads::download_write_meta,
|
||||
mini::mini_show,
|
||||
mini::mini_hide,
|
||||
mini::mini_drag_start,
|
||||
mini::mini_drag,
|
||||
mini::mini_snap,
|
||||
diagnostics::debug_freeze_ui,
|
||||
diagnostics::debug_crash,
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue