summaryrefslogtreecommitdiff
path: root/project/src/CheckButtonForm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project/src/CheckButtonForm.cpp')
-rw-r--r--project/src/CheckButtonForm.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/project/src/CheckButtonForm.cpp b/project/src/CheckButtonForm.cpp
index 373e815..c030c93 100644
--- a/project/src/CheckButtonForm.cpp
+++ b/project/src/CheckButtonForm.cpp
@@ -46,6 +46,24 @@ CheckButtonForm::OnInitializing(void)
CheckButton* pCheckButton = static_cast <CheckButton*> (GetControl("IDC_CHECKBUTTON_DISABLE", true));
pCheckButton->SetEnabled(false);
+ // Align group CheckButtons
+ CheckButton* pCheckButtonTop = static_cast <CheckButton*> (GetControl("IDC_CHECKBUTTON_GROUP_TOP", true));
+ FloatRectangle buttonTopBounds = pCheckButtonTop->GetBoundsF();
+ buttonTopBounds = CoordinateSystem::AlignToDevice(buttonTopBounds);
+ pCheckButtonTop->SetBounds(buttonTopBounds);
+
+ CheckButton* pCheckButtonMiddle = static_cast <CheckButton*> (GetControl("IDC_CHECKBUTTON_GROUP_MIDDLE", true));
+ FloatRectangle buttonMiddleBounds = pCheckButtonTop->GetBoundsF();
+ buttonMiddleBounds.y = buttonTopBounds.y + buttonTopBounds.height;
+ buttonMiddleBounds = CoordinateSystem::AlignToDevice(buttonMiddleBounds);
+ pCheckButtonMiddle->SetBounds(buttonMiddleBounds);
+
+ CheckButton* pCheckButtonBottom = static_cast <CheckButton*> (GetControl("IDC_CHECKBUTTON_GROUP_BOTTOM", true));
+ FloatRectangle buttonBottomBounds = pCheckButtonTop->GetBoundsF();
+ buttonBottomBounds.y = buttonMiddleBounds.y + buttonMiddleBounds.height;
+ buttonBottomBounds = CoordinateSystem::AlignToDevice(buttonBottomBounds);
+ pCheckButtonBottom->SetBounds(buttonBottomBounds);
+
return r;
}