- Timestamp:
- Mar 17, 2025 2:04:09 PM (8 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167979
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.cpp
r108570 r108574 293 293 m_pLabelMinSize->setText(UITranslator::formatSize(m_uSizeMin)); 294 294 m_pLabelMaxSize->setText(UITranslator::formatSize(m_uSizeMax)); 295 if (m_pEditorLabel) 296 m_pEditorLabel->setText(tr("D&isk Size")); 295 297 296 298 /* Translate fields: */ … … 342 344 m_regExNonDigitOrSeparator = QRegularExpression(QString("[^\\d%1]").arg(UITranslator::decimalSep())); 343 345 344 /* Create layout: */345 m_pLayout = new QGridLayout(this);346 AssertPtrReturnVoid(m_pLayout);347 348 /* Configure layout: */349 m_pLayout->setContentsMargins(0, 0, 0, 0);350 m_pLayout->setColumnStretch(0, 1);351 m_pLayout->setColumnStretch(1, 1);352 m_pLayout->setColumnStretch(2, 0);353 354 346 /* Create editor label: */ 355 347 if (fEnableEditorLabel) 356 348 { 357 349 m_pEditorLabel = new QLabel(this); 350 m_pEditorLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 358 351 AssertReturnVoid(m_pEditorLabel); 359 352 } … … 368 361 this, &UIMediumSizeEditor::sltSizeSliderChanged); 369 362 370 /* Add into layout: */371 m_pLayout->addWidget(m_pSlider, 0, 0, 1, 2, Qt::AlignTop);372 373 374 363 /* Create minimum size label: */ 375 364 m_pLabelMinSize = new QLabel; … … 378 367 m_pLabelMinSize->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); 379 368 380 /* Add into layout: */381 m_pLayout->addWidget(m_pLabelMinSize, 1, 0);382 383 369 /* Create maximum size label: */ 384 370 m_pLabelMaxSize = new QLabel; … … 386 372 /* Configure label: */ 387 373 m_pLabelMaxSize->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 388 /* Add into layout: */ 389 m_pLayout->addWidget(m_pLabelMaxSize, 1, 1); 374 390 375 391 376 /* Create size editor: */ 392 377 m_pEditor = new QILineEdit; 393 378 AssertPtrReturnVoid(m_pEditor); 379 if (m_pEditorLabel) 380 m_pEditorLabel->setBuddy(m_pEditorLabel); 394 381 395 382 /* Configure editor: */ … … 402 389 this, &UIMediumSizeEditor::sltSizeEditorTextChanged); 403 390 404 /* Add into layout: */ 405 m_pLayout->addWidget(m_pEditor, 0, 2, Qt::AlignTop); 391 /* Create layout: */ 392 m_pLayout = new QGridLayout(this); 393 AssertPtrReturnVoid(m_pLayout); 394 395 /* Configure layout: */ 396 m_pLayout->setContentsMargins(0, 0, 0, 0); 397 if (m_pEditorLabel) 398 { 399 m_pLayout->setColumnStretch(1, 1); 400 m_pLayout->setColumnStretch(2, 1); 401 m_pLayout->setColumnStretch(3, 0); 402 403 m_pLayout->addWidget(m_pEditorLabel, 0, 0, 1, 1); 404 m_pLayout->addWidget(m_pSlider, 0, 1, 1, 2, Qt::AlignTop); 405 m_pLayout->addWidget(m_pLabelMinSize, 1, 1); 406 m_pLayout->addWidget(m_pLabelMaxSize, 1, 2); 407 m_pLayout->addWidget(m_pEditor, 0, 3, Qt::AlignTop); 408 } 409 else 410 { 411 m_pLayout->setColumnStretch(0, 1); 412 m_pLayout->setColumnStretch(1, 1); 413 m_pLayout->setColumnStretch(2, 0); 414 415 m_pLayout->addWidget(m_pSlider, 0, 0, 1, 2, Qt::AlignTop); 416 m_pLayout->addWidget(m_pLabelMinSize, 1, 0); 417 m_pLayout->addWidget(m_pLabelMaxSize, 1, 1); 418 m_pLayout->addWidget(m_pEditor, 0, 2, Qt::AlignTop); 419 } 406 420 407 421 /* Apply language settings: */
Note:
See TracChangeset
for help on using the changeset viewer.