Commit fa83ee32854f9ef0bb6791837db35adc01b91582

Authored by Paul Wisbey
Committed by Gerrit Code Review
2 parents b44b0bec 38457eee

Merge "Fix the broken popup layout in text field example" into devel/master

examples/text-field/text-field-example.cpp
@@ -43,8 +43,6 @@ namespace @@ -43,8 +43,6 @@ namespace
43 43
44 const float BORDER_WIDTH = 4.0f; 44 const float BORDER_WIDTH = 4.0f;
45 45
46 - const Vector3 POPUP_SIZE_FACTOR_TO_PARENT = Vector3( 0.8, 0.25, 0.0 );  
47 -  
48 } // unnamed namespace 46 } // unnamed namespace
49 47
50 /** 48 /**
@@ -133,8 +131,8 @@ public: @@ -133,8 +131,8 @@ public:
133 Popup popup = Popup::New(); 131 Popup popup = Popup::New();
134 popup.SetParentOrigin( ParentOrigin::CENTER ); 132 popup.SetParentOrigin( ParentOrigin::CENTER );
135 popup.SetAnchorPoint( AnchorPoint::CENTER ); 133 popup.SetAnchorPoint( AnchorPoint::CENTER );
136 - popup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );  
137 - popup.SetSizeModeFactor( POPUP_SIZE_FACTOR_TO_PARENT ); 134 + popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
  135 + popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
138 popup.TouchSignal().Connect( this, &TextFieldExample::OnPopupTouched ); 136 popup.TouchSignal().Connect( this, &TextFieldExample::OnPopupTouched );
139 137
140 return popup; 138 return popup;