VirtualBox

Changeset 2350 in vbox for trunk


Ignore:
Timestamp:
Apr 26, 2007 9:15:08 AM (18 years ago)
Author:
vboxsync
Message:

Made “AutoMaximize height” – keeping maximum height in case of resizing – feature optional. Used for whatsThisLabels of VM & Global Settings.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/QIRichLabel.h

    r1467 r2350  
    8080   void setFixedHeight (int);
    8181
     82   void setMaxHeightMode (bool);
     83
    8284public slots:
    8385   virtual void setText( const QString &);
     
    103105
    104106signals:
    105    void         textChanged();
    106107   void         clickedOnLink (const QString&);
    107108
     
    134135   QLabelPrivate *d;
    135136   QSimpleRichText *doc;
     137   bool        mMaxHeightMode;
    136138
    137139   friend class QTipLabel;
  • trunk/src/VBox/Frontends/VirtualBox/src/QIRichLabel.cpp

    r2240 r2350  
    9393void QIRichLabel::init()
    9494{
     95   mMaxHeightMode = false;
    9596   baseheight = 0;
    9697   lpixmap = 0;
     
    169170   updateLabel (osh);
    170171
    171    if ((int)baseheight < heightForWidth (width()))
     172   if (mMaxHeightMode && (int)baseheight < heightForWidth (width()))
    172173   {
    173174       baseheight = heightForWidth (width());
    174175       QFrame::setFixedHeight (baseheight);
    175176   }
    176    emit textChanged();
    177177}
    178178
     
    261261         adjustSize();           // calls resize which repaints
    262262   }
     263}
     264
     265
     266void QIRichLabel::setMaxHeightMode (bool aEnabled)
     267{
     268    mMaxHeightMode = aEnabled;
    263269}
    264270
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h

    r2280 r2350  
    303303#endif
    304304
     305    whatsThisLabel->setMaxHeightMode (true);
    305306    whatsThisLabel->setFocusPolicy (QWidget::NoFocus);
    306307    whatsThisLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r2320 r2350  
    418418#endif
    419419
     420    whatsThisLabel->setMaxHeightMode (true);
    420421    whatsThisLabel->setFocusPolicy (QWidget::NoFocus);
    421422    whatsThisLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed);
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