The y position of the control bounds, world coordinate
(&self, y: f32)
| 1258 | |
| 1259 | /// The y position of the control bounds, world coordinate |
| 1260 | fn set_y(&self, y: f32) { |
| 1261 | let mut comp = self.as_ref().borrow_mut(); |
| 1262 | |
| 1263 | let dy = y - comp.y; |
| 1264 | |
| 1265 | comp.y = y; |
| 1266 | |
| 1267 | if !comp.ignore_spatial { |
| 1268 | comp.ignore_spatial = true; |
| 1269 | match comp.parent { |
| 1270 | Some(parent) => { |
| 1271 | // if let Some(widget) = parent.widget() { |
| 1272 | // comp.y_local = comp.y - widget.y(); // TODO: direct or with setter |
| 1273 | // } |
| 1274 | } |
| 1275 | None => { |
| 1276 | comp.y_local = comp.y; // TODO: direct or with setter |
| 1277 | } |
| 1278 | } |
| 1279 | |
| 1280 | comp.ignore_spatial = false; |
| 1281 | } |
| 1282 | |
| 1283 | self.bounds_changed(0.0, dy, 0.0, 0.0); |
| 1284 | } |
| 1285 | |
| 1286 | /// The minimum width |
| 1287 | fn w_min(&self) -> f32 { |
no test coverage detected