Changeset 58343 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 20, 2015 3:16:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UIAbstractDockIconPreview.cpp
r52730 r58343 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* VBox includes */ 22 /* Qt includes: */ 23 #include <QStyle> 24 25 /* GUI includes: */ 23 26 # include "UIAbstractDockIconPreview.h" 24 27 # include "UIFrameBuffer.h" 25 28 # include "UIMachineLogic.h" 26 29 # include "UIMachineView.h" 30 # include "UIConverter.h" 27 31 # include "UISession.h" 32 33 /* COM includes: */ 34 # include "COMEnums.h" 28 35 29 36 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 66 73 Assert(m_overlayImage); 67 74 68 m_statePaused = ::darwinToCGImageRef("state_paused_16px.png"); 75 /* Determine desired icon size for the state-overlay: */ 76 const QStyle *pStyle = QApplication::style(); 77 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 78 const QSize iconSize = QSize(iIconMetric, iIconMetric); 79 80 /* Prepare 'Paused' state-overlay: */ 81 const QPixmap statePaused = gpConverter->toIcon(KMachineState_Paused).pixmap(iconSize); 82 m_statePaused = ::darwinToCGImageRef(&statePaused); 69 83 Assert(m_statePaused); 70 m_stateSaving = ::darwinToCGImageRef("state_saving_16px.png"); 84 85 /* Prepare 'Saving' state-overlay: */ 86 const QPixmap stateSaving = gpConverter->toIcon(KMachineState_Saving).pixmap(iconSize); 87 m_stateSaving = ::darwinToCGImageRef(&stateSaving); 71 88 Assert(m_stateSaving); 72 m_stateRestoring = ::darwinToCGImageRef("state_restoring_16px.png"); 89 90 /* Prepare 'Restoring' state-overlay: */ 91 const QPixmap stateRestoring = gpConverter->toIcon(KMachineState_Restoring).pixmap(iconSize); 92 m_stateRestoring = ::darwinToCGImageRef(&stateRestoring); 73 93 Assert(m_stateRestoring); 74 94 }
Note:
See TracChangeset
for help on using the changeset viewer.