Changeset 72704 in vbox
- Timestamp:
- Jun 27, 2018 3:38:30 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123233
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
r72215 r72704 243 243 m_cSnaphot = m_machine.GetSnapshotCount(); 244 244 245 m_pixmap = vboxGlobal().vmUserPixmapDefault(m_machine, &m_logicalPixmapSize);246 if (m_pixmap.isNull())247 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);248 249 245 m_groups = m_machine.GetGroups().toList(); 250 246 … … 297 293 m_cSnaphot = 0; 298 294 299 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize);300 295 m_groups.clear(); 301 296 m_pid = (ULONG) ~0; … … 312 307 } 313 308 309 /* Recache item pixmap: */ 310 recachePixmap(); 311 314 312 return needsResort; 313 } 314 315 void UIVMItem::recachePixmap() 316 { 317 /* If machine is accessible: */ 318 if (m_fAccessible) 319 { 320 /* First, we are trying to acquire personal machine guest OS type icon: */ 321 m_pixmap = vboxGlobal().vmUserPixmapDefault(m_machine, &m_logicalPixmapSize); 322 /* If there is nothing, we are using icon corresponding to cached guest OS type: */ 323 if (m_pixmap.isNull()) 324 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 325 } 326 /* Otherwise: */ 327 else 328 { 329 /* We are using "Other" guest OS type icon: */ 330 m_pixmap = vboxGlobal().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize); 331 } 315 332 } 316 333 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.h
r72215 r72704 67 67 const QStringList &groups(); 68 68 bool recache(); 69 /** Recaches item pixmap. */ 70 void recachePixmap(); 69 71 70 72 bool canSwitchTo() const; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r69714 r72704 26 26 27 27 /* GUI includes: */ 28 # include "UIGChooser.h" 28 29 # include "UIGChooserItemMachine.h" 29 30 # include "UIGChooserItemGroup.h" … … 254 255 AssertReturnVoid(!stateIcon.isNull()); 255 256 const QSize statePixmapSize = QSize(iIconMetric, iIconMetric); 256 const QPixmap statePixmap = stateIcon.pixmap( statePixmapSize);257 const QPixmap statePixmap = stateIcon.pixmap(model()->chooser()->window()->windowHandle(), statePixmapSize); 257 258 /* Update linked values: */ 258 259 if (m_statePixmapSize != statePixmapSize) … … 810 811 { 811 812 return new UIGChooserItemMimeData(this); 813 } 814 815 void UIGChooserItemMachine::showEvent(QShowEvent *pEvent) 816 { 817 /* Call to base-class: */ 818 UIGChooserItem::showEvent(pEvent); 819 820 /* Recache and update pixmaps: */ 821 recachePixmap(); 822 updatePixmaps(); 812 823 } 813 824 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
r69500 r72704 139 139 QMimeData* createMimeData(); 140 140 141 /** Handles show @a pEvent. */ 142 virtual void showEvent(QShowEvent *pEvent) /* override */; 143 141 144 /* Handler: Resize handling stuff: */ 142 145 void resizeEvent(QGraphicsSceneResizeEvent *pEvent);
Note:
See TracChangeset
for help on using the changeset viewer.