Commit fa83ee32854f9ef0bb6791837db35adc01b91582
Committed by
Gerrit Code Review
Merge "Fix the broken popup layout in text field example" into devel/master
Showing
1 changed file
with
2 additions
and
4 deletions
examples/text-field/text-field-example.cpp
| ... | ... | @@ -43,8 +43,6 @@ namespace |
| 43 | 43 | |
| 44 | 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 | 46 | } // unnamed namespace |
| 49 | 47 | |
| 50 | 48 | /** |
| ... | ... | @@ -133,8 +131,8 @@ public: |
| 133 | 131 | Popup popup = Popup::New(); |
| 134 | 132 | popup.SetParentOrigin( ParentOrigin::CENTER ); |
| 135 | 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 | 136 | popup.TouchSignal().Connect( this, &TextFieldExample::OnPopupTouched ); |
| 139 | 137 | |
| 140 | 138 | return popup; | ... | ... |