VirtualBox

Changeset 83524 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 3, 2020 11:37:46 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136843
Message:

FE/Qt: bugref:9669: QIMessageBox: Switch the message from QILabel to QIRichTextLabel; This is necessary for more wide text wrapping control.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/extensions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r82968 r83524  
    2929#include "QIArrowSplitter.h"
    3030#include "QIDialogButtonBox.h"
    31 #include "QILabel.h"
    3231#include "QIMessageBox.h"
     32#include "QIRichTextLabel.h"
    3333#include "UIIconPool.h"
    3434
     
    120120void QIMessageBox::polishEvent(QShowEvent *pPolishEvent)
    121121{
    122     /* Tune text-label size: */
    123     m_pLabelText->useSizeHintForWidth(m_pLabelText->width());
    124     m_pLabelText->updateGeometry();
    125 
    126122    /* Call to base-class: */
    127123    QIDialog::polishEvent(pPolishEvent);
     
    213209            }
    214210            /* Create text-label: */
    215             m_pLabelText = new QILabel(m_strMessage);
     211            m_pLabelText = new QIRichTextLabel;
    216212            AssertPtrReturnVoid(m_pLabelText);
    217213            {
    218214                /* Configure text-label: */
    219                 m_pLabelText->setWordWrap(true);
    220                 m_pLabelText->setAlignment(Qt::AlignLeft | Qt::AlignTop);
    221                 QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    222                 sizePolicy.setHeightForWidth(true);
    223                 m_pLabelText->setSizePolicy(sizePolicy);
     215                m_pLabelText->setText(m_strMessage);
    224216                /* Add text-label into top-layout: */
    225217                pTopLayout->addWidget(m_pLabelText);
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h

    r82968 r83524  
    3535class QIArrowSplitter;
    3636class QIDialogButtonBox;
    37 class QILabel;
     37class QIRichTextLabel;
    3838
    3939
     
    167167    QString m_strMessage;
    168168    /** Holds the message-label instance. */
    169     QILabel *m_pLabelText;
     169    QIRichTextLabel *m_pLabelText;
    170170
    171171    /** Holds the flag check-box instance. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette