- Timestamp:
- May 22, 2015 4:40:59 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerIndicator.cpp
r52730 r56039 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Localincludes: */22 /* GUI includes: */ 23 23 # include "UINetworkManagerIndicator.h" 24 24 # include "UINetworkRequest.h" 25 # include "UIIconPool.h" 25 26 # include "VBoxGlobal.h" 26 27 … … 31 32 { 32 33 /* Assign state icons: */ 33 setStateIcon(UINetworkManagerIndicatorState_Idle, QPixmap(":/nw_16px.png"));34 setStateIcon(UINetworkManagerIndicatorState_Loading, QPixmap(":/nw_loading_16px.png"));35 setStateIcon(UINetworkManagerIndicatorState_Error, QPixmap(":/nw_error_16px.png"));34 setStateIcon(UINetworkManagerIndicatorState_Idle, UIIconPool::iconSet(":/nw_16px.png")); 35 setStateIcon(UINetworkManagerIndicatorState_Loading, UIIconPool::iconSet(":/nw_loading_16px.png")); 36 setStateIcon(UINetworkManagerIndicatorState_Error, UIIconPool::iconSet(":/nw_error_16px.png")); 36 37 37 38 /* Translate content: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
r52730 r56039 19 19 # include <precomp.h> 20 20 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 /* Global includes: */ 21 22 /* Qt includes: */ 23 # include <QApplication> 24 # include <QStyle> 22 25 # include <QLabel> 23 # include <QPaintEvent>24 26 # include <QPainter> 25 27 # include <QVBoxLayout> 26 27 /* Local includes: */ 28 # include <QPaintEvent> 29 30 /* GUI includes: */ 28 31 # include "UIPopupBox.h" 29 32 # ifdef Q_WS_MAC 30 33 # include "UIImageTools.h" 31 # endif 34 # endif /* Q_WS_MAC */ 32 35 33 36 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ … … 242 245 painter.fillRect(QRect(QPoint(0, 0), size()), pal.brush(QPalette::Active, QPalette::Base)); 243 246 /* Top header background */ 244 QLinearGradient lg(rect.x(), rect.y(), rect.x(), rect.y() + 2 * 5 + m_pTitleLabel->sizeHint().height()); 247 const int iMaxHeightHint = qMax(m_pTitleLabel->sizeHint().height(), 248 m_pTitleIcon->sizeHint().height()); 249 QLinearGradient lg(rect.x(), rect.y(), rect.x(), rect.y() + 2 * 5 + iMaxHeightHint); 245 250 lg.setColorAt(0, base.darker(95)); 246 251 lg.setColorAt(1, base.darker(110)); 247 252 int theight = rect.height(); 248 253 if (m_fOpen) 249 theight = 2 * 5 + m_pTitleLabel->sizeHint().height();254 theight = 2 * 5 + iMaxHeightHint; 250 255 painter.fillRect(QRect(rect.x(), rect.y(), rect.width(), theight), lg); 251 256 /* Outer round rectangle line */ … … 275 280 { 276 281 /* Assign title-icon: */ 277 m_pTitleIcon->setPixmap(m_titleIcon.pixmap(16, 16)); 282 const QStyle *pStyle = QApplication::style(); 283 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 284 m_pTitleIcon->setPixmap(m_titleIcon.pixmap(iIconMetric, iIconMetric)); 278 285 } 279 286 … … 283 290 m_pWarningIcon->setHidden(m_warningIcon.isNull()); 284 291 /* Assign warning-icon: */ 285 m_pWarningIcon->setPixmap(m_warningIcon.pixmap(16, 16)); 292 const QStyle *pStyle = QApplication::style(); 293 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 294 m_pWarningIcon->setPixmap(m_warningIcon.pixmap(iIconMetric, iIconMetric)); 286 295 } 287 296
Note:
See TracChangeset
for help on using the changeset viewer.