(&mut self)
| 507 | self.layer = layer; |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | fn body(&mut self, ui: &mut egui::Ui, build_glow_t: Option<f32>) { |
| 512 | self.refresh_build_target(); |
| 513 | self.ensure_layer_visible(); |
| 514 | let rect = ui.available_rect_before_wrap(); |
| 515 | ui.expand_to_include_rect(rect); |
| 516 | |
| 517 | let show_spine = !self.settings_open && self.visible_layers().is_some(); |
| 518 | let spine_width = if show_spine { spine::width() } else { 0.0 }; |
| 519 | let max_width = metrics::TOOL_WINDOW_MAX |
| 520 | .min((rect.width() - spine_width - metrics::EDITOR_MIN).max(0.0)); |
| 521 | let max_width = max_width.max(metrics::TOOL_WINDOW_MIN.min(rect.width())); |
| 522 | self.layout.tool_window_width = self |
| 523 | .layout |
| 524 | .tool_window_width |
| 525 | .clamp(metrics::TOOL_WINDOW_MIN.min(max_width), max_width); |
| 526 | |
| 527 | let tool_rect = egui::Rect::from_min_size( |
no test coverage detected