Changeset 72814 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 3, 2018 9:49:09 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
r71484 r72814 239 239 { 240 240 return m_fOpened; 241 } 242 243 bool UIPopupBox::event(QEvent *pEvent) 244 { 245 /* Handle know event types: */ 246 switch (pEvent->type()) 247 { 248 case QEvent::Show: 249 case QEvent::ScreenChangeInternal: 250 { 251 /* Update pixmaps: */ 252 updateTitleIcon(); 253 updateWarningIcon(); 254 break; 255 } 256 default: 257 break; 258 } 259 260 /* Call to base-class: */ 261 return QWidget::event(pEvent); 241 262 } 242 263 … … 316 337 { 317 338 /* Assign title-icon: */ 318 const QStyle *pStyle = QApplication::style(); 319 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 320 m_pTitleIcon->setPixmap(m_titleIcon.pixmap(iIconMetric, iIconMetric)); 339 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 340 m_pTitleIcon->setPixmap(m_titleIcon.pixmap(window()->windowHandle(), QSize(iIconMetric, iIconMetric))); 321 341 } 322 342 … … 325 345 /* Hide warning-icon if its null: */ 326 346 m_pWarningIcon->setHidden(m_warningIcon.isNull()); 347 327 348 /* Assign warning-icon: */ 328 const QStyle *pStyle = QApplication::style(); 329 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 330 m_pWarningIcon->setPixmap(m_warningIcon.pixmap(iIconMetric, iIconMetric)); 349 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 350 m_pWarningIcon->setPixmap(m_warningIcon.pixmap(window()->windowHandle(), QSize(iIconMetric, iIconMetric))); 331 351 } 332 352 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
r71630 r72814 106 106 107 107 protected: 108 109 /** Handles any Qt @a pEvent. */ 110 virtual bool event(QEvent *pEvent) /* override */; 108 111 109 112 /** Pre-handles standard Qt @a pEvent for passed @a pObject. */
Note:
See TracChangeset
for help on using the changeset viewer.