VirtualBox

Changeset 97975 in vbox


Ignore:
Timestamp:
Jan 4, 2023 11:28:02 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155066
Message:

FE/Qt: Runtime UI: Small cleanup for guest auto-resize stuff.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r97682 r97975  
    5555UIMachineViewFullscreen::UIMachineViewFullscreen(UIMachineWindow *pMachineWindow, ulong uScreenId)
    5656    : UIMachineView(pMachineWindow, uScreenId)
    57     , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
     57    , m_fGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5858{
    5959}
     
    123123void UIMachineViewFullscreen::setGuestAutoresizeEnabled(bool fEnabled)
    124124{
    125     if (m_bIsGuestAutoresizeEnabled != fEnabled)
    126     {
    127         m_bIsGuestAutoresizeEnabled = fEnabled;
    128 
    129         if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     125    if (m_fGuestAutoresizeEnabled != fEnabled)
     126    {
     127        m_fGuestAutoresizeEnabled = fEnabled;
     128
     129        if (m_fGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    130130            sltPerformGuestResize();
    131131    }
     
    186186    if (fAdjust)
    187187    {
    188         if (!m_bIsGuestAutoresizeEnabled)
     188        if (!m_fGuestAutoresizeEnabled)
    189189        {
    190190            LogRel2(("GUI: UIMachineViewFullscreen::adjustGuestScreenSize: Guest-screen auto-resize is disabled, adjustment is omitted.\n"));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h

    r96407 r97975  
    6767
    6868    /** Returns whether the guest-screen auto-resize is enabled. */
    69     virtual bool isGuestAutoresizeEnabled() const RT_OVERRIDE { return m_bIsGuestAutoresizeEnabled; }
     69    virtual bool isGuestAutoresizeEnabled() const RT_OVERRIDE { return m_fGuestAutoresizeEnabled; }
    7070    /** Defines whether the guest-screen auto-resize is @a fEnabled. */
    7171    virtual void setGuestAutoresizeEnabled(bool bEnabled) RT_OVERRIDE;
     
    7979
    8080    /* Private variables: */
    81     bool m_bIsGuestAutoresizeEnabled : 1;
     81    bool m_fGuestAutoresizeEnabled : 1;
    8282
    8383    /* Friend classes: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r97682 r97975  
    4949UIMachineViewNormal::UIMachineViewNormal(UIMachineWindow *pMachineWindow, ulong uScreenId)
    5050    : UIMachineView(pMachineWindow, uScreenId)
    51     , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
     51    , m_fGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
    5252{
    5353}
     
    6969                setMaxGuestSize();
    7070                /* And resize guest to current window size: */
    71                 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     71                if (m_fGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    7272                    QTimer::singleShot(300, this, SLOT(sltPerformGuestResize()));
    7373                break;
     
    137137void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled)
    138138{
    139     if (m_bIsGuestAutoresizeEnabled != fEnabled)
    140     {
    141         m_bIsGuestAutoresizeEnabled = fEnabled;
    142 
    143         if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     139    if (m_fGuestAutoresizeEnabled != fEnabled)
     140    {
     141        m_fGuestAutoresizeEnabled = fEnabled;
     142
     143        if (m_fGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    144144            sltPerformGuestResize();
    145145    }
     
    215215     * or the guest-additions doesn't support graphics
    216216     * we should take scroll-bars size-hints into account: */
    217     if (!m_bIsGuestAutoresizeEnabled || !uisession()->isGuestSupportsGraphics())
     217    if (!m_fGuestAutoresizeEnabled || !uisession()->isGuestSupportsGraphics())
    218218    {
    219219        if (verticalScrollBar()->isVisible())
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h

    r96407 r97975  
    6767
    6868    /** Returns whether the guest-screen auto-resize is enabled. */
    69     virtual bool isGuestAutoresizeEnabled() const RT_OVERRIDE { return m_bIsGuestAutoresizeEnabled; }
     69    virtual bool isGuestAutoresizeEnabled() const RT_OVERRIDE { return m_fGuestAutoresizeEnabled; }
    7070    /** Defines whether the guest-screen auto-resize is @a fEnabled. */
    7171    virtual void setGuestAutoresizeEnabled(bool bEnabled) RT_OVERRIDE;
     
    8383
    8484    /* Private members: */
    85     bool m_bIsGuestAutoresizeEnabled : 1;
     85    bool m_fGuestAutoresizeEnabled : 1;
    8686
    8787    /* Friend classes: */
Note: See TracChangeset for help on using the changeset viewer.

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