AddControl(*pPopupScrollPanel);
Button* pButtonCancel = new (std::nothrow) Button();
- pButtonCancel->Construct(Rectangle(120, 340, 300, 70), L"Cancel");
+ pButtonCancel->Construct(Rectangle((GetClientAreaBounds().width - 300) / 2, 340, 300, 74), L"Cancel");
pButtonCancel->SetActionId(ID_BUTTON_CANCEL_POPUP);
pButtonCancel->AddActionEventListener(*this);
AddControl(*pButtonCancel);
__pCreatePopup->SetTitleText(L"Create Category");
Button* pButtonCancel = new (std::nothrow) Button();
- pButtonCancel->Construct(Rectangle(70, 140, 200, 70), L"Cancel");
+ pButtonCancel->Construct(Rectangle((GetClientAreaBounds().width - 440) / 4, 140, 220, 74), L"Cancel");
pButtonCancel->SetActionId(ID_BUTTON_CANCEL_POPUP);
pButtonCancel->AddActionEventListener(*this);
__pCreatePopup->AddControl(*pButtonCancel);
Button* pButtonSave = new (std::nothrow) Button();
- pButtonSave->Construct(Rectangle(290, 140, 200, 70), L"Save");
+ pButtonSave->Construct(Rectangle((GetClientAreaBounds().width - 430) / 4 + 240, 140, 220, 74), L"Save");
pButtonSave->SetActionId(ID_BUTTON_SAVE_POPUP);
pButtonSave->AddActionEventListener(*this);
__pCreatePopup->AddControl(*pButtonSave);
Label* pNameLabel = new (std::nothrow) Label();
- pNameLabel->Construct(Rectangle(30, 20, 150, 70), L"Name: ");
+ pNameLabel->Construct(Rectangle(30, 20, 150, 74), L"Name: ");
pNameLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
__pCreatePopup->AddControl(*pNameLabel);
__pNameEditField = new (std::nothrow) EditField();
- __pNameEditField->Construct(Rectangle(170, 20, 350, 70), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
+ __pNameEditField->Construct(Rectangle(170, 20, 350, 74), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
__pNameEditField->SetGuideText(L"Group Name");
__pNameEditField->AddActionEventListener(*this);
__pCreatePopup->AddControl(*__pNameEditField);