MCPcopy Create free account
hub / github.com/9miao/CrossApp / achieveLayout

Method achieveLayout

CrossApp/controller/CADrawerController.cpp:153–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void CADrawerController::achieveLayout()
154{
155 const CAInterfaceOrientation& orientation = CAApplication::getApplication()->getStatusBarOrientation();
156 if (orientation == CAInterfaceOrientationLandscape)
157 {
158 m_fDivision = this->getView()->getBounds().size.width - 120;
159
160 m_rHideLayout[0].horizontal.left = -m_fDivision;
161 m_rHideLayout[0].horizontal.width = m_fDivision;
162 m_rHideLayout[0].vertical = DVerticalLayoutFill;
163
164 m_rShowLayout[0].horizontal.left = 0;
165 m_rShowLayout[0].horizontal.width = m_fDivision;
166 m_rShowLayout[0].vertical = DVerticalLayoutFill;
167
168
169 m_rHideLayout[1].horizontal = DHorizontalLayoutFill;
170 m_rHideLayout[1].vertical = DVerticalLayoutFill;
171
172 m_rShowLayout[1].horizontal = DHorizontalLayout_L_R(m_fDivision, -m_fDivision);
173 m_rShowLayout[1].vertical = DVerticalLayoutFill;
174 }
175 else
176 {
177 m_fDivision = this->getView()->getBounds().size.width - 120;
178
179 m_rHideLayout[0].horizontal.left = -m_fDivision;
180 m_rHideLayout[0].horizontal.width = m_fDivision;
181 m_rHideLayout[0].vertical = DVerticalLayoutFill;
182
183 m_rShowLayout[0].horizontal.left = 0;
184 m_rShowLayout[0].horizontal.width = m_fDivision;
185 m_rShowLayout[0].vertical = DVerticalLayoutFill;
186
187
188 m_rHideLayout[1].horizontal = DHorizontalLayoutFill;
189 m_rHideLayout[1].vertical = DVerticalLayoutFill;
190
191 m_rShowLayout[1].horizontal = DHorizontalLayout_L_R(m_fDivision, -m_fDivision);
192 m_rShowLayout[1].vertical = DVerticalLayoutFill;
193 }
194
195}
196
197void CADrawerController::changeStatusBarOrientation(CAObject* obj)
198{

Callers 2

viewDidLoadMethod · 0.95

Calls 2

DHorizontalLayout_L_RFunction · 0.85
getViewMethod · 0.80

Tested by

no test coverage detected