feat(quick-pane): polish compact chat controls
This commit is contained in:
@@ -284,7 +284,7 @@ async fn get_model_catalog() -> Result<Value, String> {
|
||||
}
|
||||
|
||||
fn quick_pane_height(height: f64) -> f64 {
|
||||
height.clamp(360.0, 520.0)
|
||||
height.clamp(240.0, 520.0)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
@@ -790,9 +790,9 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(quick_pane.width, 640.0);
|
||||
assert_eq!(quick_pane.height, 360.0);
|
||||
assert_eq!(quick_pane.height, 240.0);
|
||||
assert_eq!(quick_pane.min_width, Some(520.0));
|
||||
assert_eq!(quick_pane.min_height, Some(360.0));
|
||||
assert_eq!(quick_pane.min_height, Some(240.0));
|
||||
assert_eq!(quick_pane.url.to_string(), "index.html");
|
||||
assert!(!quick_pane.visible);
|
||||
assert!(quick_pane.transparent);
|
||||
@@ -802,7 +802,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn quick_pane_height_stays_within_content_limit() {
|
||||
assert_eq!(quick_pane_height(200.0), 360.0);
|
||||
assert_eq!(quick_pane_height(200.0), 240.0);
|
||||
assert_eq!(quick_pane_height(420.0), 420.0);
|
||||
assert_eq!(quick_pane_height(900.0), 520.0);
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
"label": "quick-pane",
|
||||
"title": "Pi Quick Pane",
|
||||
"width": 640,
|
||||
"height": 360,
|
||||
"height": 240,
|
||||
"minWidth": 520,
|
||||
"minHeight": 360,
|
||||
"minHeight": 240,
|
||||
"center": true,
|
||||
"visible": false,
|
||||
"decorations": false,
|
||||
|
||||
Reference in New Issue
Block a user