Changeset 78680 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 23, 2019 7:11:40 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r78519 r78680 204 204 const char *UIExtraDataDefs::GUI_GuestControl_ProcessControlDialogGeometry = "GUI/GuestControl/ProcessControlDialogGeometry"; 205 205 206 /* Soft Keyboard: */ 207 const char *UIExtraDataDefs::GUI_SoftKeyboard_DialogGeometry = "GUI/SoftKeyboardDialogGeometry"; 208 206 209 /* File Manager options: */ 207 210 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerOptions = "GUI/GuestControl/FileManagerOptions"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r78567 r78680 382 382 /** @} */ 383 383 384 /** @name Soft Keyboard related data 385 * @{ */ 386 extern const char *GUI_SoftKeyboard_DialogGeometry; 387 /** @} */ 388 384 389 /** @name File Manager options 385 390 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r78519 r78680 4289 4289 } 4290 4290 4291 QRect UIExtraDataManager::softKeyboardDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry) 4292 { 4293 return dialogGeometry(GUI_SoftKeyboard_DialogGeometry, pWidget, defaultGeometry); 4294 } 4295 4296 void UIExtraDataManager::setSoftKeyboardDialogGeometry(const QRect &geometry, bool fMaximized) 4297 { 4298 setDialogGeometry(GUI_SoftKeyboard_DialogGeometry, geometry, fMaximized); 4299 } 4300 4301 bool UIExtraDataManager::softKeyboardDialogShouldBeMaximized() 4302 { 4303 /* Get corresponding extra-data: */ 4304 const QStringList data = extraDataStringList(GUI_SoftKeyboard_DialogGeometry); 4305 4306 /* Make sure 5th item has required value: */ 4307 return data.size() == 5 && data[4] == GUI_Geometry_State_Max; 4308 } 4309 4291 4310 void UIExtraDataManager::setFileManagerOptions(bool fListDirectoriesFirst, 4292 4311 bool fShowDeleteConfirmation, -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r78519 r78680 669 669 void setFileManagerVisiblePanels(const QStringList &panelNameList); 670 670 QStringList fileManagerVisiblePanels(); 671 /** @} */ 672 673 /** @name Soft Keyboard 674 * @{ */ 675 QRect softKeyboardDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry); 676 void setSoftKeyboardDialogGeometry(const QRect &geometry, bool fMaximized); 677 bool softKeyboardDialogShouldBeMaximized(); 671 678 /** @} */ 672 679 -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r78672 r78680 636 636 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); 637 637 /* Create layout: */ 638 639 638 m_pMainLayout = new QHBoxLayout(this); 640 639 if (!m_pMainLayout) … … 643 642 if (!m_pContainerWidget) 644 643 return; 645 m_pContainerWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);644 //m_pContainerWidget->setStyleSheet("background-color:red;"); 646 645 m_pMainLayout->addWidget(m_pContainerWidget); 647 646 } … … 720 719 721 720 int y = 0; 721 int totalHeight = 0; 722 int totalWidth = 0; 722 723 for (int i = 0; i < m_rows.size(); ++i) 723 724 { … … 728 729 pRow->setVisible(true); 729 730 y += fMultiplier * pRow->m_iHeight; 730 pRow->updateLayout(); 731 } 732 update(); 731 totalWidth += fMultiplier * pRow->m_iWidth; 732 totalHeight += fMultiplier * pRow->m_iHeight; 733 pRow->updateLayout(); 734 } 733 735 } 734 736 -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboardDialog.cpp
r78635 r78680 109 109 const QRect desktopRect = gpDesktop->availableGeometry(this); 110 110 int iDefaultWidth = desktopRect.width() / 2; 111 int iDefaultHeight = desktopRect.height() * 3 / 4;111 int iDefaultHeight = 0.5 * iDefaultWidth; 112 112 113 113 QRect defaultGeometry(0, 0, iDefaultWidth, iDefaultHeight); … … 116 116 117 117 /* Load geometry from extradata: */ 118 QRect geometry = gEDataManager-> guestProcessControlDialogGeometry(this, defaultGeometry);118 QRect geometry = gEDataManager->softKeyboardDialogGeometry(this, defaultGeometry); 119 119 120 120 /* Restore geometry: */ … … 131 131 /* darwinIsWindowMaximized expects a non-const QWidget*. thus const_cast: */ 132 132 QWidget *pw = const_cast<QWidget*>(qobject_cast<const QWidget*>(this)); 133 gEDataManager->set GuestProcessControlDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw));133 gEDataManager->setSoftKeyboardDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw)); 134 134 #else /* !VBOX_WS_MAC */ 135 gEDataManager->set GuestProcessControlDialogGeometry(saveGeometry, isMaximized());135 gEDataManager->setSoftKeyboardDialogGeometry(saveGeometry, isMaximized()); 136 136 #endif /* !VBOX_WS_MAC */ 137 LogRel2(("GUI: Guest Process ControlDialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n",137 LogRel2(("GUI: Soft Keyboard Dialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n", 138 138 saveGeometry.x(), saveGeometry.y(), saveGeometry.width(), saveGeometry.height())); 139 139 } … … 141 141 bool UISoftKeyboardDialog::shouldBeMaximized() const 142 142 { 143 return gEDataManager-> guestProcessControlDialogShouldBeMaximized();143 return gEDataManager->softKeyboardDialogShouldBeMaximized(); 144 144 } 145 145 -
trunk/src/VBox/Frontends/VirtualBox/xml/us_layout.xml
r78672 r78680 2 2 <layout> 3 3 <row> 4 <height> 50</height>4 <height>40</height> 5 5 <key> 6 6 <width>50</width> … … 95 95 </row> 96 96 <row> 97 <height> 50</height>97 <height>40</height> 98 98 <key> 99 99 <width>50</width> … … 195 195 </row> 196 196 <row> 197 <height> 50</height>197 <height>40</height> 198 198 <key> 199 199 <width>70</width> … … 286 286 287 287 <row> 288 <height> 50</height>288 <height>40</height> 289 289 <key> 290 290 <width>70</width> … … 370 370 </row> 371 371 <row> 372 <height> 50</height>372 <height>40</height> 373 373 <key> 374 374 <width>115</width> … … 451 451 452 452 <row> 453 <height> 50</height>453 <height>40</height> 454 454 <key> 455 455 <width>90</width>
Note:
See TracChangeset
for help on using the changeset viewer.