Changeset 60703 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 26, 2016 10:59:20 AM (9 years ago)
- 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 104 104 static void destroy(UIMachineView *pMachineView); 105 105 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); } 108 110 109 111 /** Send saved guest-screen size-hint to the guest. -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r60362 r60703 131 131 m_bIsGuestAutoresizeEnabled = fEnabled; 132 132 133 if ( uisession()->isGuestSupportsGraphics())133 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 134 134 sltPerformGuestResize(); 135 135 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r59380 r60703 58 58 //void cleanupCommon() {} 59 59 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 */; 62 64 63 65 /** Adjusts guest-screen size to correspond current <i>working area</i> size. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r60607 r60703 58 58 //void cleanupCommon() {} 59 59 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 */; 62 64 63 65 /** Resends guest size-hint. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r60611 r60703 521 521 /* Get the best size w/o scroll-bars: */ 522 522 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 } 527 534 528 535 /* Resize the frame to fit the contents: */
Note:
See TracChangeset
for help on using the changeset viewer.