#endif
void camwnd_update_xor_rectangle( CamWnd& self, rect_t area ){
- if ( gtk_widget_get_visible( self.m_gl_widget ) ) {
+ if ( self.m_gl_widget.visible() ) {
self.m_XORRectangle.set( rectangle_from_area( area.min, area.max, self.getCamera().width, self.getCamera().height ) );
}
}
}
inline WindowVector windowvector_for_widget_centre( ui::Widget widget ){
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
+ auto allocation = widget.dimensions();
return WindowVector( static_cast<float>( allocation.width / 2 ), static_cast<float>(allocation.height / 2 ) );
}