_dx: f32 =0.0, _dy: f32 =0.0, _dw: f32 =0.0, _dh: f32 =0.0
(&self, dx: f32, dy: f32, dw: f32, dh: f32)
| 448 | |
| 449 | // _dx: f32 =0.0, _dy: f32 =0.0, _dw: f32 =0.0, _dh: f32 =0.0 |
| 450 | fn bounds_changed(&self, dx: f32, dy: f32, dw: f32, dh: f32) { |
| 451 | // self.base.bounds_changed(_dx, _dy, _dw, _dh); |
| 452 | |
| 453 | if let Some(ref close_handle) = self.close_handle { |
| 454 | close_handle.set_x_local(self.w() - self.title_margin_right - 24.0); |
| 455 | } |
| 456 | |
| 457 | if let Some(ref collapse_handle) = self.collapse_handle { |
| 458 | let x = if self.closable { |
| 459 | self.w() - self.title_margin_right - 48.0 |
| 460 | } else { |
| 461 | self.w() - self.title_margin_right - 24.0 |
| 462 | }; |
| 463 | |
| 464 | collapse_handle.set_x_local(x); |
| 465 | } |
| 466 | |
| 467 | if let Some(ref title) = self.title { |
| 468 | title.set_w(self.w() - self.title_margin_right); |
| 469 | } |
| 470 | |
| 471 | if let Some(ref resize_handle) = self.resize_handle { |
| 472 | resize_handle.set_pos(self.x() + self.w() - 24.0, self.y() + self.h() - 24.0); |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | fn node(&self) -> Option<Node> { |
| 477 | Some(self.node) |