Changeset 102697 in vbox
- Timestamp:
- Dec 25, 2023 9:51:58 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp
r102696 r102697 390 390 { 391 391 if (m_pLineEdit) 392 { 392 393 m_pLineEdit->setPlaceholderText(strText); 394 adjustEditorGeometry(); 395 } 393 396 } 394 397 … … 549 552 const int iWidth = width(); 550 553 554 /* Acquire filter editor placeholder width: */ 555 QFontMetrics fm(m_pLineEdit->font()); 556 const int iPlaceholderWidth = fm.horizontalAdvance(m_pLineEdit->placeholderText()) 557 + 2 * 2 /* left/right panel/frame width, no pixelMetric */ 558 + 10 /* left margin, assigned via setStyleSheet */; 551 559 /* Acquire filter editor size-hint: */ 552 560 const QSize esh = m_pLineEdit->minimumSizeHint(); 553 const int iMinimumEditorWidth = esh.width();561 const int iMinimumEditorWidth = qMax(esh.width(), iPlaceholderWidth); 554 562 const int iMinimumEditorHeight = esh.height(); 555 563 /* Acquire filter button size-hint: */ … … 566 574 567 575 /* Update minimum/maximum filter editor width: */ 568 m_iUnfocusedEditorWidth = qM ax(iWidth / 2 - iMinimumButtonWidth, iMinimumEditorWidth);576 m_iUnfocusedEditorWidth = qMin(iWidth / 2 - iMinimumButtonWidth, iMinimumEditorWidth); 569 577 m_iFocusedEditorWidth = qMax(iWidth - iMinimumButtonWidth, iMinimumEditorWidth); 570 578 m_pAnimation->update();
Note:
See TracChangeset
for help on using the changeset viewer.