VirtualBox

Ignore:
Timestamp:
Apr 26, 2016 10:59:20 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​​​​​​​​bugref:6577: Runtime UI: Forgot conditions check in r106753, similar to r106749.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r60362 r60703  
    104104    static void destroy(UIMachineView *pMachineView);
    105105
    106     /* Public setters: */
    107     virtual void setGuestAutoresizeEnabled(bool /* fEnabled */) {}
     106    /** Returns whether the guest-screen auto-resize is enabled. */
     107    virtual bool isGuestAutoresizeEnabled() const { return true; }
     108    /** Defines whether the guest-screen auto-resize is @a fEnabled. */
     109    virtual void setGuestAutoresizeEnabled(bool fEnabled) { Q_UNUSED(fEnabled); }
    108110
    109111    /** Send saved guest-screen size-hint to the guest.
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r60362 r60703  
    131131        m_bIsGuestAutoresizeEnabled = fEnabled;
    132132
    133         if (uisession()->isGuestSupportsGraphics())
     133        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    134134            sltPerformGuestResize();
    135135    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h

    r59380 r60703  
    5858    //void cleanupCommon() {}
    5959
    60     /* Private setters: */
    61     void setGuestAutoresizeEnabled(bool bEnabled);
     60    /** Returns whether the guest-screen auto-resize is enabled. */
     61    virtual bool isGuestAutoresizeEnabled() const /* override */ { return m_bIsGuestAutoresizeEnabled; }
     62    /** Defines whether the guest-screen auto-resize is @a fEnabled. */
     63    virtual void setGuestAutoresizeEnabled(bool bEnabled) /* override */;
    6264
    6365    /** Adjusts guest-screen size to correspond current <i>working area</i> size. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h

    r60607 r60703  
    5858    //void cleanupCommon() {}
    5959
    60     /* Hidden setters: */
    61     void setGuestAutoresizeEnabled(bool bEnabled);
     60    /** Returns whether the guest-screen auto-resize is enabled. */
     61    virtual bool isGuestAutoresizeEnabled() const /* override */ { return m_bIsGuestAutoresizeEnabled; }
     62    /** Defines whether the guest-screen auto-resize is @a fEnabled. */
     63    virtual void setGuestAutoresizeEnabled(bool bEnabled) /* override */;
    6264
    6365    /** Resends guest size-hint. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r60611 r60703  
    521521    /* Get the best size w/o scroll-bars: */
    522522    QSize s = sizeHint();
    523     if (machineView()->verticalScrollBar()->isVisible())
    524         s -= QSize(machineView()->verticalScrollBar()->sizeHint().width(), 0);
    525     if (machineView()->horizontalScrollBar()->isVisible())
    526         s -= QSize(0, machineView()->horizontalScrollBar()->sizeHint().height());
     523
     524    /* If guest-screen auto-resize is not enabled
     525     * or the guest-additions doesn't support graphics
     526     * we should take scroll-bars size-hints into account: */
     527    if (!machineView()->isGuestAutoresizeEnabled() || !uisession()->isGuestSupportsGraphics())
     528    {
     529        if (machineView()->verticalScrollBar()->isVisible())
     530            s -= QSize(machineView()->verticalScrollBar()->sizeHint().width(), 0);
     531        if (machineView()->horizontalScrollBar()->isVisible())
     532            s -= QSize(0, machineView()->horizontalScrollBar()->sizeHint().height());
     533    }
    527534
    528535    /* Resize the frame to fit the contents: */
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