| 281 | } |
| 282 | |
| 283 | void Canvas::HandleSizeChange() { |
| 284 | auto allocation = GetAllocation(); |
| 285 | |
| 286 | m_custom_viewport->SetSize( |
| 287 | sf::Vector2f( |
| 288 | std::floor( allocation.size.x + .5f ), |
| 289 | std::floor( allocation.size.y + .5f ) |
| 290 | ) |
| 291 | ); |
| 292 | |
| 293 | if( m_render_texture ) { |
| 294 | m_resize = true; |
| 295 | } |
| 296 | |
| 297 | Invalidate(); |
| 298 | } |
| 299 | |
| 300 | void Canvas::HandleAbsolutePositionChange() { |
| 301 | auto position = Widget::GetAbsolutePosition(); |