Changeset 41257 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 11, 2012 3:15:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
r41255 r41257 80 80 /* Update title-icon: */ 81 81 updateTitleIcon(); 82 /* Recalculate title-size: */ 83 recalc(); 82 84 } 83 85 … … 93 95 /* Update warning-icon: */ 94 96 updateWarningIcon(); 97 /* Recalculate title-size: */ 98 recalc(); 95 99 } 96 100 … … 106 110 /* Update title: */ 107 111 updateTitle(); 112 /* Recalculate title-size: */ 113 recalc(); 108 114 } 109 115 … … 267 273 /* Assign title-icon: */ 268 274 m_pTitleIcon->setPixmap(m_titleIcon.pixmap(16, 16)); 269 /* Recalculate title-size: */270 recalc();271 275 } 272 276 … … 277 281 /* Assign warning-icon: */ 278 282 m_pWarningIcon->setPixmap(m_warningIcon.pixmap(16, 16)); 279 /* Recalculate title-size: */280 recalc();281 283 } 282 284 283 285 void UIPopupBox::updateTitle() 284 286 { 285 /* Update title: */287 /* If title-link is disabled or not set: */ 286 288 if (!m_fLinkEnabled || m_strLink.isEmpty()) 289 { 290 /* We should just set simple text title: */ 287 291 m_pTitleLabel->setText(QString("<b>%1</b>").arg(m_strTitle)); 288 /* Recalculate title-size: */ 289 recalc(); 292 } 293 /* If title-link is enabled and set: */ 294 else if (m_fLinkEnabled && !m_strLink.isEmpty()) 295 { 296 /* We should set html reference title: */ 297 QPalette pal = m_pTitleLabel->palette(); 298 m_pTitleLabel->setText(QString("<b><a style=\"text-decoration: none; color: %1\" href=\"%2\">%3</a></b>") 299 .arg(m_fHeaderHover ? pal.color(QPalette::Link).name() : pal.color(QPalette::WindowText).name()) 300 .arg(m_strLink) 301 .arg(m_strTitle)); 302 } 290 303 } 291 304 … … 328 341 329 342 /* Update title: */ 330 QPalette pal = m_pTitleLabel->palette(); 331 m_pTitleLabel->setText(QString("<b><a style=\"text-decoration: none; color: %1\" href=\"%2\">%3</a></b>") 332 .arg(m_fHeaderHover ? pal.color(QPalette::Link).name() : pal.color(QPalette::WindowText).name()) 333 .arg(m_strLink) 334 .arg(m_strTitle)); 343 updateTitle(); 344 345 /* Call for update: */ 335 346 update(); 336 347 }
Note:
See TracChangeset
for help on using the changeset viewer.