VirtualBox

Changeset 47137 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 14, 2013 5:27:50 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Global preferences: *Language* page cleanup/rework (part 2).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/global
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp

    r47136 r47137  
    170170/* Language page constructor: */
    171171UIGlobalSettingsLanguage::UIGlobalSettingsLanguage()
    172     : m_fIsLanguageChanged(false)
     172    : m_fPolished(false)
     173    , m_fIsLanguageChanged(false)
    173174{
    174175    /* Apply UI decorations: */
     
    180181    m_pLanguageTree->hideColumn(2);
    181182    m_pLanguageTree->hideColumn(3);
     183    m_pLanguageTree->setMinimumHeight(150);
    182184    m_pLanguageInfo->setWordWrapMode(QTextOption::WordWrap);
     185    m_pLanguageInfo->setMinimumHeight(QFontMetrics(m_pLanguageInfo->font(), m_pLanguageInfo).height() * 5);
    183186
    184187    /* Setup connections: */
     
    212215    /* Fetch from cache: */
    213216    reload(m_cache.m_strLanguageId);
    214 
    215     /* Remember current info-label width: */
    216     m_pLanguageInfo->setMinimumTextWidth(m_pLanguageInfo->width());
    217217}
    218218
     
    256256    /* Reload language tree: */
    257257    reload(VBoxGlobal::languageId());
     258}
     259
     260void UIGlobalSettingsLanguage::showEvent(QShowEvent *pEvent)
     261{
     262    /* Call to base-class: */
     263    UISettingsPageGlobal::showEvent(pEvent);
     264
     265    /* Polishing border: */
     266    if (m_fPolished)
     267        return;
     268    m_fPolished = true;
     269
     270    /* Call for polish event: */
     271    polishEvent(pEvent);
     272}
     273
     274void UIGlobalSettingsLanguage::polishEvent(QShowEvent*)
     275{
     276    /* Remember current info-label width: */
     277    m_pLanguageInfo->setMinimumTextWidth(m_pLanguageInfo->width());
    258278}
    259279
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h

    r47136 r47137  
    6262    void retranslateUi();
    6363
     64    /* Handlers: Event stuff: */
     65    void showEvent(QShowEvent *pEvent);
     66    void polishEvent(QShowEvent *pEvent);
     67
    6468private slots:
    6569
     
    7680
    7781    /* Variables: */
     82    bool m_fPolished;
    7883    bool m_fIsLanguageChanged;
    7984
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