Render the selected element detail panel in the debug view.
(
&mut self,
info_text_config: usize,
info_title_config: usize,
)
| 8537 | |
| 8538 | /// Render the selected element detail panel in the debug view. |
| 8539 | fn render_debug_selected_element_panel( |
| 8540 | &mut self, |
| 8541 | info_text_config: usize, |
| 8542 | info_title_config: usize, |
| 8543 | ) { |
| 8544 | let row_height = Self::DEBUG_VIEW_ROW_HEIGHT; |
| 8545 | let outer_padding = Self::DEBUG_VIEW_OUTER_PADDING; |
| 8546 | let attr_padding = PaddingConfig { |
| 8547 | left: outer_padding, |
| 8548 | right: outer_padding, |
| 8549 | top: 8, |
| 8550 | bottom: 8, |
| 8551 | }; |
| 8552 | |
| 8553 | let selected_id = self.debug_selected_element_id; |
| 8554 | let selected_item = match self.layout_element_map.get(&selected_id) { |
| 8555 | Some(item) => item.clone(), |
| 8556 | None => return, |
| 8557 | }; |
| 8558 | let layout_elem_idx = selected_item.layout_element_index as usize; |
| 8559 | if layout_elem_idx >= self.layout_elements.len() { |
| 8560 | return; |
| 8561 | } |
| 8562 | |
| 8563 | let layout_config_index = self.layout_elements[layout_elem_idx].layout_config_index; |
| 8564 | let layout_config = self.layout_configs[layout_config_index]; |
| 8565 | |
| 8566 | self.debug_open(&ElementDeclaration { |
| 8567 | layout: LayoutConfig { |
| 8568 | sizing: SizingConfig { |
| 8569 | width: SizingAxis { type_: SizingType::Grow, ..Default::default() }, |
| 8570 | height: SizingAxis { |
| 8571 | type_: SizingType::Fixed, |
| 8572 | min_max: SizingMinMax { min: 316.0, max: 316.0 }, |
| 8573 | ..Default::default() |
| 8574 | }, |
| 8575 | }, |
| 8576 | layout_direction: LayoutDirection::TopToBottom, |
| 8577 | ..Default::default() |
| 8578 | }, |
| 8579 | background_color: Self::DEBUG_COLOR_2, |
| 8580 | clip: ClipConfig { |
| 8581 | vertical: true, |
| 8582 | scroll_y: true, |
| 8583 | child_offset: self.get_scroll_offset(), |
| 8584 | ..Default::default() |
| 8585 | }, |
| 8586 | border: BorderConfig { |
| 8587 | color: Self::DEBUG_COLOR_3, |
| 8588 | width: BorderWidth { between_children: 1, ..Default::default() }, |
| 8589 | ..Default::default() |
| 8590 | }, |
| 8591 | ..Default::default() |
| 8592 | }); |
| 8593 | { |
| 8594 | // Header: "Layout Config" + element ID |
| 8595 | self.debug_open_id("Ply__DebugView_LayoutConfigHeader", &ElementDeclaration { |
| 8596 | layout: LayoutConfig { |
no test coverage detected