- Timestamp:
- Jan 30, 2024 12:29:34 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 161368
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
r102613 r103121 34 34 #include <QMenu> 35 35 #include <QStyleOptionFrame> 36 #include <QWindow>37 36 38 37 /* GUI includes: */ 39 38 #include "QILineEdit.h" 39 #include "UIDesktopWidgetWatchdog.h" 40 40 #include "UIIconPool.h" 41 41 … … 242 242 void UIMarkableLineEdit::mark(bool fError, const QString &strErrorMessage /* = QString() */) 243 243 { 244 AssertPtrReturnVoid(m_pIconLabel); 244 245 m_pIconLabel->setVisible(true); 245 AssertReturnVoid(m_pIconLabel);246 const QIcon icon = fError ? UIIconPool::iconSet(":/status_error_16px.png") : UIIconPool::iconSet(":/status_check_16px.png"); 246 247 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 247 const qreal fDevicePixelRatio = window() && window()->windowHandle() ? window()->windowHandle()->devicePixelRatio() : 1; 248 if (fError) 249 m_pIconLabel->setPixmap(UIIconPool::iconSet(":/status_error_16px.png").pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio)); 250 else 251 m_pIconLabel->setPixmap(UIIconPool::iconSet(":/status_check_16px.png").pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio)); 248 const qreal fDevicePixelRatio = gpDesktop->devicePixelRatio(m_pIconLabel); 249 m_pIconLabel->setPixmap(icon.pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio)); 252 250 m_pIconLabel->setToolTip(strErrorMessage); 253 251 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBox.cpp
r101560 r103121 32 32 #include <QStyle> 33 33 #include <QVBoxLayout> 34 #include <QWindow>35 34 36 35 /* GUI includes: */ … … 38 37 #include "QIToolButton.h" 39 38 #include "UICommon.h" 39 #include "UIDesktopWidgetWatchdog.h" 40 40 #include "UIIconPool.h" 41 41 #include "UIToolBox.h" … … 296 296 return; 297 297 } 298 const int i Metric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);299 const qreal fDevicePixelRatio = window() && window()->windowHandle() ? window()->windowHandle()->devicePixelRatio() : 1;300 m_pIconLabel->setPixmap(icon.pixmap(QSize(i Metric, iMetric), fDevicePixelRatio));298 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 299 const qreal fDevicePixelRatio = gpDesktop->devicePixelRatio(m_pIconLabel); 300 m_pIconLabel->setPixmap(icon.pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio)); 301 301 m_pIconLabel->setToolTip(strToolTip); 302 302 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r101382 r103121 29 29 #include <QCheckBox> 30 30 #include <QDir> 31 #include <QStyle> 31 32 #include <QRegularExpression> 32 33 #include <QVBoxLayout> … … 35 36 #include "QIRichTextLabel.h" 36 37 #include "UICommon.h" 38 #include "UIDesktopWidgetWatchdog.h" 39 #include "UIIconPool.h" 37 40 #include "UINameAndSystemEditor.h" 38 41 #include "UINotificationCenter.h" … … 567 570 } 568 571 569 m_pInfoLabel->setText(QString("<img src=\":/session_info_16px.png\" style=\"vertical-align:top\"> %1").arg(strMessage)); 572 const QIcon icon = UIIconPool::iconSet(":/session_info_16px.png"); 573 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 574 const qreal fDevicePixelRatio = gpDesktop->devicePixelRatio(m_pInfoLabel); 575 m_pInfoLabel->registerPixmap(icon.pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio), "wizard://info"); 576 m_pInfoLabel->setText(QString("<img src='wizard://info' style=\"vertical-align:top\"> %1").arg(strMessage)); 570 577 } 571 578
Note:
See TracChangeset
for help on using the changeset viewer.