fix(desktop): ajusta tamanho da janela hub expandida
- Reduz tamanho de 380x480 para 340x400 (cabe melhor na tela) - Reposiciona antes de redimensionar para evitar corte - Melhora logging de debug 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8863fffc37
commit
c776499403
1 changed files with 5 additions and 5 deletions
|
|
@ -1235,7 +1235,7 @@ fn open_hub_window_with_state(app: &tauri::AppHandle, start_minimized: bool) ->
|
|||
let (width, height) = if start_minimized {
|
||||
(200.0, 52.0) // Tamanho minimizado (chip)
|
||||
} else {
|
||||
(380.0, 480.0) // Tamanho expandido (lista)
|
||||
(340.0, 400.0) // Tamanho expandido (lista)
|
||||
};
|
||||
|
||||
// Posicionar no canto inferior direito
|
||||
|
|
@ -1284,14 +1284,14 @@ pub fn set_hub_minimized(app: &tauri::AppHandle, minimized: bool) -> Result<(),
|
|||
let (width, height) = if minimized {
|
||||
(200.0, 52.0) // Chip minimizado
|
||||
} else {
|
||||
(380.0, 480.0) // Lista expandida
|
||||
(340.0, 400.0) // Lista expandida (ajustado para caber melhor)
|
||||
};
|
||||
|
||||
// Primeiro reposiciona, depois redimensiona para evitar corte
|
||||
let (x, y) = resolve_chat_window_position(app, Some(&window), width, height);
|
||||
|
||||
window.set_size(tauri::LogicalSize::new(width, height)).map_err(|e| e.to_string())?;
|
||||
window.set_position(tauri::LogicalPosition::new(x, y)).map_err(|e| e.to_string())?;
|
||||
window.set_size(tauri::LogicalSize::new(width, height)).map_err(|e| e.to_string())?;
|
||||
|
||||
crate::log_info!("Hub -> minimized={}", minimized);
|
||||
crate::log_info!("Hub -> minimized={}, size={}x{}, pos=({},{})", minimized, width, height, x, y);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue