VirtualBox

Changeset 105567 in vbox


Ignore:
Timestamp:
Aug 1, 2024 3:34:45 PM (4 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10665: New VM wizard: Make sure Base Memory and Virtual CPU editor labels aligned accordingly to macOS guidelines.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp

    r104915 r105567  
    424424}
    425425
     426void UINewVMHardwareContainer::updateMinimumLayoutHint()
     427{
     428    /* These editors have own labels, but we want them to be properly layouted according to each other: */
     429    int iMinimumLayoutHint = 0;
     430    if (m_pBaseMemoryEditor && !m_pBaseMemoryEditor->isHidden())
     431        iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pBaseMemoryEditor->minimumLabelHorizontalHint());
     432    if (m_pVirtualCPUEditor && !m_pVirtualCPUEditor->isHidden())
     433        iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pVirtualCPUEditor->minimumLabelHorizontalHint());
     434    if (m_pBaseMemoryEditor)
     435        m_pBaseMemoryEditor->setMinimumLayoutIndent(iMinimumLayoutHint);
     436    if (m_pVirtualCPUEditor)
     437        m_pVirtualCPUEditor->setMinimumLayoutIndent(iMinimumLayoutHint);
     438}
     439
    426440void UINewVMHardwareContainer::sltRetranslateUI()
    427441{
     
    433447                                                     "be able to boot if this option is activated."));
    434448    }
    435 }
     449
     450    updateMinimumLayoutHint();
     451}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h

    r103950 r105567  
    190190    void prepare();
    191191
     192    /** Updates minimum layout hint. */
     193    void updateMinimumLayoutHint();
     194
    192195    UIBaseMemoryEditor *m_pBaseMemoryEditor;
    193196    UIVirtualCPUEditor *m_pVirtualCPUEditor;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette