VirtualBox

Changeset 236 in vbox for trunk/src


Ignore:
Timestamp:
Jan 23, 2007 1:12:32 PM (18 years ago)
Author:
vboxsync
Message:

FE/Qt: Fixed layout problems (too tall primary message text label) in QIMessagteBox.

File:
1 edited

Legend:

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

    r1 r236  
    7070
    7171    QHBox *main = new QHBox (this);
     72    main->setMargin (0);
    7273    main->setSpacing (10);
    73     main->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum);
    7474    layout->addWidget (main);
    7575
    7676    licon = new QLabel (main);
    7777    licon->setPixmap (QMessageBox::standardIcon ((QMessageBox::Icon) icon));
    78     licon->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
     78    licon->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
    7979    licon->setAlignment (AlignHCenter | AlignTop);
    8080
    8181    message = new QVBox (main);
     82    message->setMargin (0);
    8283    message->setSpacing (10);
    8384
    8485    ltext = new QLabel (text, message);
    8586    ltext->setAlignment (AlignAuto | AlignTop | ExpandTabs | WordBreak);
    86     ltext->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed);
     87    ltext->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed, true);
    8788
    8889    dbox = new QVBox (this);
    89     dbox->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
     90    dbox->setMargin (0);
    9091    dbox->setSpacing (10);
    9192    layout->addWidget (dbox);
     
    9899        dtext->setMinimumSize (40 * fm.width ('m'), fm.lineSpacing() * 6);
    99100    }
    100     dtext->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
    101101    dtext->setReadOnly (true);
    102102    dtext->setWrapPolicy (QTextEdit::AtWordOrDocumentBoundary);
     103    dtext->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
    103104
    104105    /* cbflag has no parent initially, setDetailsShown() will do that */
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