- Timestamp:
- Apr 4, 2013 11:32:41 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r45308 r45337 49 49 /* Set caption: */ 50 50 setWindowTitle(strCaption); 51 52 /* Set focus to dialog initially: */53 setFocus();54 51 55 52 /* Prepare content: */ … … 200 197 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 201 198 { 199 /* Configure layout: */ 200 #ifdef Q_WS_MAC 201 pMainLayout->setContentsMargins(40, 11, 40, 11); 202 pMainLayout->setSpacing(15); 203 #else /* !Q_WS_MAC */ 204 VBoxGlobal::setLayoutMargin(pMainLayout, 11); 205 pMainLayout->setSpacing(10); 206 #endif /* !Q_WS_MAC */ 202 207 /* Create top-layout: */ 203 208 QHBoxLayout *pTopLayout = new QHBoxLayout; 204 209 { 210 /* Insert into parent layout: */ 211 pMainLayout->addLayout(pTopLayout); 212 /* Configure layout: */ 213 VBoxGlobal::setLayoutMargin(pTopLayout, 0); 214 pTopLayout->setSpacing(10); 205 215 /* Create icon-label: */ 206 216 m_pIconLabel = new QLabel; 207 217 { 218 /* Insert into parent layout: */ 219 pTopLayout->addWidget(m_pIconLabel); 208 220 /* Configure label: */ 209 221 m_pIconLabel->setPixmap(standardPixmap(m_iconType, this)); … … 214 226 m_pTextLabel = new QILabel(m_strMessage); 215 227 { 228 /* Insert into parent layout: */ 229 pTopLayout->addWidget(m_pTextLabel); 216 230 /* Configure label: */ 217 231 m_pTextLabel->setWordWrap(true); … … 221 235 m_pTextLabel->setSizePolicy(sizePolicy); 222 236 } 223 /* Configure layout: */224 VBoxGlobal::setLayoutMargin(pTopLayout, 0);225 pTopLayout->setSpacing(10);226 pTopLayout->addWidget(m_pIconLabel);227 pTopLayout->addWidget(m_pTextLabel);228 237 } 229 238 /* Create details text-view: */ … … 240 249 m_pDetailsContainer = new QIArrowSplitter(m_pDetailsTextView); 241 250 { 251 /* Insert into parent layout: */ 252 pMainLayout->addWidget(m_pDetailsContainer); 242 253 /* Configure container: */ 243 254 connect(m_pDetailsContainer, SIGNAL(showBackDetails()), this, SLOT(detailsBack())); … … 250 261 m_pFlagCheckBox = new QCheckBox; 251 262 { 263 /* Insert into parent layout: */ 264 pMainLayout->addWidget(m_pFlagCheckBox, 0, Qt::AlignHCenter | Qt::AlignVCenter); 252 265 /* Configure check-box: */ 253 266 m_pFlagCheckBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); … … 258 271 m_pButtonBox = new QIDialogButtonBox; 259 272 { 273 /* Insert into parent layout: */ 274 pMainLayout->addWidget(m_pButtonBox); 260 275 /* Configure button-box: */ 261 276 m_pButtonBox->setCenterButtons(true); … … 277 292 } 278 293 } 279 /* Configure layout: */280 #ifdef Q_WS_MAC281 pMainLayout->setContentsMargins(40, 11, 40, 11);282 pMainLayout->setSpacing(15);283 #else /* !Q_WS_MAC */284 VBoxGlobal::setLayoutMargin(pMainLayout, 11);285 pMainLayout->setSpacing(10);286 #endif /* !Q_WS_MAC */287 pMainLayout->addLayout(pTopLayout);288 pMainLayout->addWidget(m_pDetailsContainer);289 pMainLayout->addWidget(m_pFlagCheckBox, 0, Qt::AlignHCenter | Qt::AlignVCenter);290 pMainLayout->addWidget(m_pButtonBox);291 294 } 292 295 }
Note:
See TracChangeset
for help on using the changeset viewer.