- Timestamp:
- Nov 20, 2014 5:59:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r53364 r53365 218 218 frameBuffer()->height() != iHeight; 219 219 220 // TODO: Move to appropriate place! 221 /* Adjust 'scale' mode for current machine-view size: */ 220 /* Adjust 'scale' mode to current machine-view size: */ 222 221 if (visualStateType() == UIVisualStateType_Scale) 222 { 223 /* Assign new frame-buffer logical-size: */ 223 224 frameBuffer()->setScaledSize(size()); 225 } 224 226 225 227 /* Perform frame-buffer mode-change: */ … … 603 605 if (m_sizeHintOverride.isValid()) 604 606 return m_sizeHintOverride; 607 608 /* Get frame-buffer size-hint: */ 609 QSize size(m_pFrameBuffer->width(), m_pFrameBuffer->height()); 610 605 611 #ifdef VBOX_WITH_DEBUGGER_GUI 606 612 // TODO: Fix all DEBUGGER stuff! 607 613 /* HACK ALERT! Really ugly workaround for the resizing to 9x1 done by DevVGA if provoked before power on. */ 608 QSize fb(m_pFrameBuffer->width(), m_pFrameBuffer->height()); 609 if (fb.width() < 16 || fb.height() < 16) 614 if (size.width() < 16 || size.height() < 16) 610 615 if (vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled()) 611 fb = QSize(640, 480); 612 return QSize(fb.width() + frameWidth() * 2, fb.height() + frameWidth() * 2); 613 #else /* !VBOX_WITH_DEBUGGER_GUI */ 614 return QSize(m_pFrameBuffer->width() + frameWidth() * 2, m_pFrameBuffer->height() + frameWidth() * 2); 616 size = QSize(640, 480); 615 617 #endif /* !VBOX_WITH_DEBUGGER_GUI */ 618 619 /* Return the resulting size-hint: */ 620 return QSize(size.width() + frameWidth() * 2, size.height() + frameWidth() * 2); 616 621 } 617 622 … … 680 685 QSize size = gEDataManager->lastGuestSizeHint(m_uScreenId, vboxGlobal().managedVMUuid()); 681 686 682 /* Return loaded or default: */ 683 return size.isValid() ? size : QSize(800, 600); 687 /* Invent the default if necessary: */ 688 if (!size.isValid()) 689 size = QSize(800, 600); 690 691 /* Return size: */ 692 return size; 684 693 } 685 694
Note:
See TracChangeset
for help on using the changeset viewer.