Changeset 94357 in vbox
- Timestamp:
- Mar 24, 2022 2:42:20 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150663
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.cpp
r93992 r94357 33 33 34 34 35 UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent , bool fWithLabels /* = false */)35 UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent) 36 36 : QIWithRetranslateUI<QWidget>(pParent) 37 , m_fWithLabels(fWithLabels)38 37 , m_pLayout(0) 39 38 , m_pLabel(0) … … 236 235 237 236 /* Prepare label: */ 238 if (m_fWithLabels) 239 { 240 m_pLabel = new QLabel(this); 241 if (m_pLabel) 242 { 243 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 244 m_pLayout->addWidget(m_pLabel, 0, 0); 245 } 237 m_pLabel = new QLabel(this); 238 if (m_pLabel) 239 { 240 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 241 m_pLayout->addWidget(m_pLabel, 0, 0); 246 242 } 247 243 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.h
r93992 r94357 43 43 public: 44 44 45 /** Creates scale factor editor passing @a pParent to the base-class. 46 * @param fWithLabels Brings whether we should add labels ourselves. */ 47 UIScaleFactorEditor(QWidget *pParent, bool fWithLabels = false); 45 /** Creates scale factor editor passing @a pParent to the base-class. */ 46 UIScaleFactorEditor(QWidget *pParent); 48 47 49 48 /** Defines @a iMonitorCount. */ … … 101 100 /** @name Member widgets. 102 101 * @{ */ 103 bool m_fWithLabels;104 102 QGridLayout *m_pLayout; 105 103 QLabel *m_pLabel; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r94323 r94357 178 178 179 179 /* Prepare 'scale-factor' editor: */ 180 m_pEditorScaleFactor = new UIScaleFactorEditor(this , true /* with label */);180 m_pEditorScaleFactor = new UIScaleFactorEditor(this); 181 181 if (m_pEditorScaleFactor) 182 182 pLayout->addWidget(m_pEditorScaleFactor); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r94341 r94357 310 310 , m_pLabelMonitorCountMin(0) 311 311 , m_pLabelMonitorCountMax(0) 312 , m_pLabelScaleFactor(0)313 312 , m_pEditorScaleFactor(0) 314 313 , m_pLabelGraphicsController(0) … … 327 326 , m_pLabelRemoteDisplayOptions(0) 328 327 , m_pCheckboxMultipleConn(0) 329 330 328 , m_pTabRecording(0) 331 329 , m_pCheckboxRecording(0) … … 362 360 , m_pScrollerRecordingScreens(0) 363 361 { 364 /* Prepare: */365 362 prepare(); 366 363 } … … 368 365 UIMachineSettingsDisplay::~UIMachineSettingsDisplay() 369 366 { 370 /* Cleanup: */371 367 cleanup(); 372 368 } … … 781 777 m_pSliderMonitorCount->setToolTip(tr("Controls the amount of virtual monitors provided to the virtual machine.")); 782 778 m_pSpinboxMonitorCount->setToolTip(tr("Controls the amount of virtual monitors provided to the virtual machine.")); 783 m_pLabelScaleFactor->setText(tr("Scale &Factor:"));784 779 m_pEditorScaleFactor->setToolTip(tr("Controls the guest screen scale factor.")); 785 780 m_pLabelGraphicsController->setText(tr("&Graphics Controller:")); … … 867 862 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorVideoMemorySize->minimumLabelHorizontalHint()); 868 863 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelMonitorCount->minimumSizeHint().width()); 869 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_p LabelScaleFactor->minimumSizeHint().width());864 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorScaleFactor->minimumLabelHorizontalHint()); 870 865 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelGraphicsController->minimumSizeHint().width()); 871 866 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelAcceleration->minimumSizeHint().width()); 872 867 m_pEditorVideoMemorySize->setMinimumLayoutIndent(iMinimumLayoutHint); 868 m_pEditorScaleFactor->setMinimumLayoutIndent(iMinimumLayoutHint); 873 869 m_pLayoutScreen->setColumnMinimumWidth(0, iMinimumLayoutHint); 874 870 … … 1180 1176 } 1181 1177 1182 /* Prepare scale factor label: */1183 m_pLabelScaleFactor = new QLabel(m_pTabScreen);1184 if (m_pLabelScaleFactor)1185 {1186 m_pLabelScaleFactor->setAlignment(Qt::AlignRight | Qt::AlignVCenter);1187 m_pLayoutScreen->addWidget(m_pLabelScaleFactor, 3, 0);1188 }1189 1178 /* Prepare scale factor editor: */ 1190 1179 m_pEditorScaleFactor = new UIScaleFactorEditor(m_pTabScreen); 1191 1180 if (m_pEditorScaleFactor) 1192 { 1193 if (m_pLabelScaleFactor) 1194 m_pLabelScaleFactor->setBuddy(m_pEditorScaleFactor->focusProxy()); 1195 m_pLayoutScreen->addWidget(m_pEditorScaleFactor, 3, 1, 2, 2); 1196 } 1181 m_pLayoutScreen->addWidget(m_pEditorScaleFactor, 3, 0, 1, 3); 1197 1182 1198 1183 /* Prepare graphics controller label: */ … … 1201 1186 { 1202 1187 m_pLabelGraphicsController->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 1203 m_pLayoutScreen->addWidget(m_pLabelGraphicsController, 5, 0);1188 m_pLayoutScreen->addWidget(m_pLabelGraphicsController, 4, 0); 1204 1189 } 1205 1190 /* Prepare graphics controller editor: */ … … 1209 1194 if (m_pLabelGraphicsController) 1210 1195 m_pLabelGraphicsController->setBuddy(m_pEditorGraphicsController); 1211 m_pLayoutScreen->addWidget(m_pEditorGraphicsController, 5, 1, 1, 2);1196 m_pLayoutScreen->addWidget(m_pEditorGraphicsController, 4, 1, 1, 2); 1212 1197 } 1213 1198 … … 1217 1202 { 1218 1203 m_pLabelAcceleration->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 1219 m_pLayoutScreen->addWidget(m_pLabelAcceleration, 6, 0);1204 m_pLayoutScreen->addWidget(m_pLabelAcceleration, 5, 0); 1220 1205 } 1221 1206 /* Prepare 3D checkbox: */ 1222 1207 m_pCheckbox3D = new QCheckBox(m_pTabScreen); 1223 1208 if (m_pCheckbox3D) 1224 m_pLayoutScreen->addWidget(m_pCheckbox3D, 6, 1);1209 m_pLayoutScreen->addWidget(m_pCheckbox3D, 5, 1); 1225 1210 } 1226 1211 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r94341 r94357 213 213 /** Holds the monitor count max label instance. */ 214 214 QLabel *m_pLabelMonitorCountMax; 215 /** Holds the scale factor label instance. */216 QLabel *m_pLabelScaleFactor;217 215 /** Holds the scale factor editor instance. */ 218 216 UIScaleFactorEditor *m_pEditorScaleFactor;
Note:
See TracChangeset
for help on using the changeset viewer.