@@ -169,10 +169,10 @@ impl ConfirmDialog { |
| 169 | 169 | /// Get the dialog rectangle (centered in bounds). |
| 170 | 170 | fn dialog_rect(&self) -> Rect { |
| 171 | 171 | // Calculate width based on message length, with min/max constraints |
| 172 | | - let base_width = 450; |
| 173 | | - let dialog_width = base_width.min(self.bounds.width.saturating_sub(40)); |
| 174 | | - // Need enough height for: title (30) + message (~60) + gap (20) + buttons (32) + padding (40) |
| 175 | | - let dialog_height = 220.min(self.bounds.height.saturating_sub(20)); |
| 172 | + let base_width = 480; |
| 173 | + let dialog_width = base_width.min(self.bounds.width.saturating_sub(20)); |
| 174 | + // Need enough height for: title (40) + message (~80) + gap (20) + buttons (32) + padding (48) |
| 175 | + let dialog_height = 240.min(self.bounds.height.saturating_sub(20)); |
| 176 | 176 | let x = self.bounds.x + (self.bounds.width as i32 - dialog_width as i32) / 2; |
| 177 | 177 | let y = self.bounds.y + (self.bounds.height as i32 - dialog_height as i32) / 2; |
| 178 | 178 | Rect::new(x, y, dialog_width, dialog_height) |
@@ -215,9 +215,9 @@ impl ConfirmDialog { |
| 215 | 215 | fn button_rects(&self) -> (Rect, Rect) { |
| 216 | 216 | let dialog = self.dialog_rect(); |
| 217 | 217 | let button_width = 100; |
| 218 | | - let button_height = 32; |
| 219 | | - // Position buttons 20px from bottom for more breathing room |
| 220 | | - let button_y = dialog.y + dialog.height as i32 - button_height as i32 - 20; |
| 218 | + let button_height = 36; |
| 219 | + // Position buttons 24px from bottom for more breathing room |
| 220 | + let button_y = dialog.y + dialog.height as i32 - button_height as i32 - 24; |
| 221 | 221 | let button_gap = 16; |
| 222 | 222 | let total_width = button_width * 2 + button_gap; |
| 223 | 223 | let start_x = dialog.x + (dialog.width as i32 - total_width as i32) / 2; |
@@ -264,10 +264,10 @@ impl ConfirmDialog { |
| 264 | 264 | .font_size(theme.font_size) |
| 265 | 265 | .color(theme.item_foreground); |
| 266 | 266 | |
| 267 | | - // Wrap and render message lines |
| 268 | | - let max_chars = ((dialog_rect.width - 40) as f64 / (theme.font_size * 0.6)) as usize; |
| 269 | | - let wrapped_lines = Self::wrap_text(&self.message, max_chars.max(30)); |
| 270 | | - let mut y = dialog_rect.y + 52; |
| 267 | + // Wrap and render message lines (use conservative char width estimate) |
| 268 | + let max_chars = ((dialog_rect.width - 50) as f64 / (theme.font_size * 0.55)) as usize; |
| 269 | + let wrapped_lines = Self::wrap_text(&self.message, max_chars.max(25)); |
| 270 | + let mut y = dialog_rect.y + 56; |
| 271 | 271 | for line in wrapped_lines { |
| 272 | 272 | renderer.text( |
| 273 | 273 | &line, |