儲存庫 vbox 的更動 63230
- 時間撮記:
- 2016-8-9 下午05:18:44 (8 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r63054 r63230 123 123 setGeometry(m_normalGeometry); 124 124 } 125 126 /* Normalize to the optimal size: */ 127 #ifdef VBOX_WS_X11 128 QTimer::singleShot(0, this, SLOT(sltNormalizeGeometry())); 129 #else /* !VBOX_WS_X11 */ 130 normalizeGeometry(true /* adjust position */); 131 #endif /* !VBOX_WS_X11 */ 125 132 } 126 133 } … … 173 180 /* Adjust machine-view accordingly: */ 174 181 adjustMachineViewSize(); 182 } 183 184 void UIMachineWindowScale::normalizeGeometry(bool fAdjustPosition) 185 { 186 #ifndef VBOX_GUI_WITH_CUSTOMIZATIONS1 187 /* Skip if maximized: */ 188 if (isMaximized()) 189 return; 190 191 /* Calculate client window offsets: */ 192 QRect frGeo = frameGeometry(); 193 const QRect geo = geometry(); 194 const int dl = geo.left() - frGeo.left(); 195 const int dt = geo.top() - frGeo.top(); 196 const int dr = frGeo.right() - geo.right(); 197 const int db = frGeo.bottom() - geo.bottom(); 198 199 /* Adjust position if necessary: */ 200 if (fAdjustPosition) 201 frGeo = VBoxGlobal::normalizeGeometry(frGeo, gpDesktop->overallAvailableRegion()); 202 203 /* Finally, set the frame geometry: */ 204 setGeometry(frGeo.left() + dl, frGeo.top() + dt, 205 frGeo.width() - dl - dr, frGeo.height() - dt - db); 206 #else /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 207 /* Customer request: There should no be 208 * machine-window resize/move on machine-view resize: */ 209 Q_UNUSED(fAdjustPosition); 210 #endif /* VBOX_GUI_WITH_CUSTOMIZATIONS1 */ 175 211 } 176 212 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
r62913 r63230 57 57 virtual void restoreCachedGeometry() /* override */; 58 58 59 /** Performs window geometry normalization according to guest-size and host's available geometry. 60 * @param fAdjustPosition Determines whether is it necessary to adjust position as well. */ 61 virtual void normalizeGeometry(bool fAdjustPosition) /* override */; 62 59 63 /** Common @a pEvent handler. */ 60 64 bool event(QEvent *pEvent);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器