Changeset 56040 in vbox
- Timestamp:
- May 22, 2015 5:36:44 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r52730 r56040 37 37 # include "UILineTextEdit.h" 38 38 # include "UIConverter.h" 39 # include "UIIconPool.h" 39 40 40 41 /* COM includes: */ … … 267 268 switch (m_type) 268 269 { 269 case KVirtualSystemDescriptionType_Name: v = QIcon(":/name_16px.png"); break;270 case KVirtualSystemDescriptionType_Name: v = UIIconPool::iconSet(":/name_16px.png"); break; 270 271 case KVirtualSystemDescriptionType_Product: 271 272 case KVirtualSystemDescriptionType_ProductUrl: … … 274 275 case KVirtualSystemDescriptionType_Version: 275 276 case KVirtualSystemDescriptionType_Description: 276 case KVirtualSystemDescriptionType_License: v = QIcon(":/description_16px.png"); break;277 case KVirtualSystemDescriptionType_OS: v = QIcon(":/os_type_16px.png"); break;278 case KVirtualSystemDescriptionType_CPU: v = QIcon(":/cpu_16px.png"); break;279 case KVirtualSystemDescriptionType_Memory: v = QIcon(":/ram_16px.png"); break;280 case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = QIcon(":/ide_16px.png"); break;281 case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = QIcon(":/sata_16px.png"); break;282 case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = QIcon(":/scsi_16px.png"); break;283 case KVirtualSystemDescriptionType_HardDiskControllerSAS: v = QIcon(":/scsi_16px.png"); break;284 case KVirtualSystemDescriptionType_HardDiskImage: v = QIcon(":/hd_16px.png"); break;285 case KVirtualSystemDescriptionType_CDROM: v = QIcon(":/cd_16px.png"); break;286 case KVirtualSystemDescriptionType_Floppy: v = QIcon(":/fd_16px.png"); break;287 case KVirtualSystemDescriptionType_NetworkAdapter: v = QIcon(":/nw_16px.png"); break;288 case KVirtualSystemDescriptionType_USBController: v = QIcon(":/usb_16px.png"); break;289 case KVirtualSystemDescriptionType_SoundCard: v = QIcon(":/sound_16px.png"); break;277 case KVirtualSystemDescriptionType_License: v = UIIconPool::iconSet(":/description_16px.png"); break; 278 case KVirtualSystemDescriptionType_OS: v = UIIconPool::iconSet(":/os_type_16px.png"); break; 279 case KVirtualSystemDescriptionType_CPU: v = UIIconPool::iconSet(":/cpu_16px.png"); break; 280 case KVirtualSystemDescriptionType_Memory: v = UIIconPool::iconSet(":/ram_16px.png"); break; 281 case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = UIIconPool::iconSet(":/ide_16px.png"); break; 282 case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = UIIconPool::iconSet(":/sata_16px.png"); break; 283 case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = UIIconPool::iconSet(":/scsi_16px.png"); break; 284 case KVirtualSystemDescriptionType_HardDiskControllerSAS: v = UIIconPool::iconSet(":/scsi_16px.png"); break; 285 case KVirtualSystemDescriptionType_HardDiskImage: v = UIIconPool::iconSet(":/hd_16px.png"); break; 286 case KVirtualSystemDescriptionType_CDROM: v = UIIconPool::iconSet(":/cd_16px.png"); break; 287 case KVirtualSystemDescriptionType_Floppy: v = UIIconPool::iconSet(":/fd_16px.png"); break; 288 case KVirtualSystemDescriptionType_NetworkAdapter: v = UIIconPool::iconSet(":/nw_16px.png"); break; 289 case KVirtualSystemDescriptionType_USBController: v = UIIconPool::iconSet(":/usb_16px.png"); break; 290 case KVirtualSystemDescriptionType_SoundCard: v = UIIconPool::iconSet(":/sound_16px.png"); break; 290 291 default: break; 291 292 } … … 294 295 m_type == KVirtualSystemDescriptionType_OS) 295 296 { 296 v = vboxGlobal().vmGuestOSTypeIcon(m_strConfigValue).scaledToHeight(16, Qt::SmoothTransformation); 297 const QStyle *pStyle = QApplication::style(); 298 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 299 v = vboxGlobal().vmGuestOSTypeIcon(m_strConfigValue).scaledToHeight(iIconMetric, Qt::SmoothTransformation); 297 300 } 298 301 break; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorButton.cpp
r52730 r56040 34 34 : QIWithRetranslateUI <QPushButton> (aParent) 35 35 { 36 /* Determine icon metric: */ 37 const QStyle *pStyle = QApplication::style(); 38 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 36 39 /* We have to make sure that the button has strong focus, otherwise the 37 40 * editing is ended when the menu is shown */ 38 41 setFocusPolicy (Qt::StrongFocus); 39 setIconSize (QSize ( 16, 16));42 setIconSize (QSize (iIconMetric, iIconMetric)); 40 43 /* Create a signal mapper so that we not have to react to every single 41 44 * menu activation ourself. */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
r52730 r56040 52 52 bool fInSaveState = false; 53 53 bool fEnabled = false; 54 const QStyle *pStyle = QApplication::style(); 55 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 54 56 if (machine.GetAccessible()) 55 57 { 56 pixIcon = vboxGlobal().vmGuestOSTypeIcon(machine.GetOSTypeId()).scaled( 16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);58 pixIcon = vboxGlobal().vmGuestOSTypeIcon(machine.GetOSTypeId()).scaled(iIconMetric, iIconMetric, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 57 59 strName = machine.GetName(); 58 60 strUuid = machine.GetId(); … … 65 67 QFileInfo fi(settingsFile); 66 68 strName = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts) ? fi.completeBaseName() : fi.fileName(); 67 pixIcon = QPixmap(":/os_other.png").scaled( 16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);69 pixIcon = QPixmap(":/os_other.png").scaled(iIconMetric, iIconMetric, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 68 70 } 69 71 QListWidgetItem *pItem = new VMListWidgetItem(pixIcon, strName, strUuid, fInSaveState, m_pVMSelector);
Note:
See TracChangeset
for help on using the changeset viewer.