| 151 | } |
| 152 | |
| 153 | void 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 | |
| 197 | void CADrawerController::changeStatusBarOrientation(CAObject* obj) |
| 198 | { |
no test coverage detected