MCPcopy Create free account
hub / github.com/TankOs/SFGUI / HandleSizeChange

Method HandleSizeChange

src/SFGUI/CheckButton.cpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void CheckButton::HandleSizeChange() {
45 float spacing( Context::Get().GetEngine().GetProperty<float>( "Spacing", shared_from_this() ) );
46 float box_size( Context::Get().GetEngine().GetProperty<float>( "BoxSize", shared_from_this() ) );
47
48 if( GetChild() ) {
49 GetChild()->SetAllocation(
50 sf::FloatRect(
51 { box_size + spacing, GetAllocation().size.y / 2.f - GetChild()->GetAllocation().size.y / 2.f },
52 GetChild()->GetRequisition()
53 )
54 );
55 }
56}
57
58
59}

Callers

nothing calls this directly

Calls 1

SetAllocationMethod · 0.80

Tested by

no test coverage detected