Changeset 90633 in vbox
- Timestamp:
- Aug 11, 2021 6:25:25 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
r90107 r90633 24 24 #include <QPalette> 25 25 #include <QStyleOptionFrame> 26 #include <QTime> 26 27 27 28 /* GUI includes: */ … … 100 101 void QILineEdit::paintEvent(QPaintEvent *pPaintEvent) 101 102 { 103 printf("%d\n", QTime::currentTime().second()); 102 104 QLineEdit::paintEvent(pPaintEvent); 103 105 104 106 if (m_fMarkForError) 105 107 { 106 const int iIconMargin = 1. * QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);107 int iIconSize = height() - 2 * iIconMargin;108 108 if (!m_pIconLabel) 109 109 m_pIconLabel = new QLabel(this); 110 m_pIconLabel->setPixmap(m_markIcon.pixmap(windowHandle(), QSize(iIconSize, iIconSize))); 111 m_pIconLabel->setToolTip(m_strErrorMessage); 112 m_pIconLabel->move(width() - iIconSize - iIconMargin, iIconMargin); 113 m_pIconLabel->show(); 110 111 if (m_pIconLabel && m_pIconLabel->isHidden()) 112 { 113 const int iIconMargin = 1. * QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin); 114 int iIconSize = height() - 2 * iIconMargin; 115 m_pIconLabel->setPixmap(m_markIcon.pixmap(windowHandle(), QSize(iIconSize, iIconSize))); 116 m_pIconLabel->setToolTip(m_strErrorMessage); 117 m_pIconLabel->move(width() - iIconSize - iIconMargin, iIconMargin); 118 m_pIconLabel->show(); 119 } 114 120 } 115 121 else 116 122 { 117 if (m_pIconLabel )123 if (m_pIconLabel && m_pIconLabel->isVisible()) 118 124 m_pIconLabel->hide(); 119 125 }
Note:
See TracChangeset
for help on using the changeset viewer.