Commit 65963089384728904c8510b22fea28afb280dbcf
1 parent
fc09702d
(Buttons) Ensured check box buttons fill to parent to show the entire text
Change-Id: I1f4ca14ce8ecb0edda7f296572d58a9965351444
Showing
1 changed file
with
4 additions
and
1 deletions
examples/buttons/buttons-example.cpp
| 1 | /* | 1 | /* |
| 2 | - * Copyright (c) 2014 Samsung Electronics Co., Ltd. | 2 | + * Copyright (c) 2016 Samsung Electronics Co., Ltd. |
| 3 | * | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -306,6 +306,7 @@ class ButtonsController: public ConnectionTracker | @@ -306,6 +306,7 @@ class ButtonsController: public ConnectionTracker | ||
| 306 | mCheckboxButton1.SetName( "checkbox1" ); | 306 | mCheckboxButton1.SetName( "checkbox1" ); |
| 307 | mCheckboxButton1.SetLabelText( "CheckBox1 is unselected" ); | 307 | mCheckboxButton1.SetLabelText( "CheckBox1 is unselected" ); |
| 308 | mCheckboxButton1.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | 308 | mCheckboxButton1.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); |
| 309 | + mCheckboxButton1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | ||
| 309 | 310 | ||
| 310 | checkBoxBackground.Add( mCheckboxButton1 ); | 311 | checkBoxBackground.Add( mCheckboxButton1 ); |
| 311 | } | 312 | } |
| @@ -316,6 +317,7 @@ class ButtonsController: public ConnectionTracker | @@ -316,6 +317,7 @@ class ButtonsController: public ConnectionTracker | ||
| 316 | mCheckboxButton2.SetLabelText( "CheckBox2 is selected" ); | 317 | mCheckboxButton2.SetLabelText( "CheckBox2 is selected" ); |
| 317 | mCheckboxButton2.SetSelected( true ); | 318 | mCheckboxButton2.SetSelected( true ); |
| 318 | mCheckboxButton2.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | 319 | mCheckboxButton2.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); |
| 320 | + mCheckboxButton2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | ||
| 319 | 321 | ||
| 320 | checkBoxBackground.Add( mCheckboxButton2 ); | 322 | checkBoxBackground.Add( mCheckboxButton2 ); |
| 321 | } | 323 | } |
| @@ -325,6 +327,7 @@ class ButtonsController: public ConnectionTracker | @@ -325,6 +327,7 @@ class ButtonsController: public ConnectionTracker | ||
| 325 | mCheckboxButton3.SetName( "checkbox3" ); | 327 | mCheckboxButton3.SetName( "checkbox3" ); |
| 326 | mCheckboxButton3.SetLabelText( "CheckBox3 is unselected" ); | 328 | mCheckboxButton3.SetLabelText( "CheckBox3 is unselected" ); |
| 327 | mCheckboxButton3.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); | 329 | mCheckboxButton3.StateChangedSignal().Connect( this, &ButtonsController::OnCheckBoxesSelected ); |
| 330 | + mCheckboxButton3.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); | ||
| 328 | 331 | ||
| 329 | checkBoxBackground.Add( mCheckboxButton3 ); | 332 | checkBoxBackground.Add( mCheckboxButton3 ); |
| 330 | } | 333 | } |