VirtualBox

Changeset 106015 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 12, 2024 12:20:05 AM (3 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10513: Global Preferences / VM Settings: Make sure dialog layout is properly updated after serialization end which can change size-hints for numerous editors and can cause layout invalidation; Was able to reproduce it on different than English languages cause layout hints depends on NLS tag sizes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp

    r106012 r106015  
    779779    , m_pSerializeProcess(0)
    780780    , m_fPolished(false)
     781    , m_fFirstSerializationDone(false)
    781782    , m_fSerializationIsInProgress(false)
    782783    , m_fSerializationClean(false)
     
    873874    /* Mark serialization finished: */
    874875    m_fSerializationIsInProgress = false;
     876
     877    /* Finally make sure layouts freshly activated after
     878     * all the pages loaded (as overall size-hint changed): */
     879    foreach (QLayout *pLayout, findChildren<QLayout*>())
     880        pLayout->activate();
     881    /* Update scroll-area geometry finally: */
     882    m_pScrollArea->updateGeometry();
     883
     884    /* For the 1st serialization we have some additional handling: */
     885    if (!m_fFirstSerializationDone)
     886    {
     887        /* Which should be called just once: */
     888        m_fFirstSerializationDone = true;
     889
     890        /* Make sure layout request processed before we resize widget to new size: */
     891        QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
     892        /* Resize to minimum size: */
     893        resize(minimumSizeHint());
     894        /* Explicit centering according to our parent: */
     895        gpDesktop->centerWidget(this, parentWidget(), false);
     896    }
    875897}
    876898
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.h

    r105780 r106015  
    238238    /** Holds whether dialog is polished. */
    239239    bool  m_fPolished;
     240    /** Holds whether the first serialization is done. */
     241    bool  m_fFirstSerializationDone;
    240242    /** Holds whether the serialization is in progress. */
    241243    bool  m_fSerializationIsInProgress;
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