more size policy improvements; refs #142

master
Marc Wäckerlin 13 years ago
parent 7edc638149
commit fab67933f5
  1. 22
      src/browser.hxx

@ -108,7 +108,9 @@ class Browser: public QMainWindow, protected Ui::Browser {
statusBar()->addPermanentWidget
(btn=new QPushButton(QIcon(":/icons/16x16/butt16_10.png"), ""));
assert(connect(btn, SIGNAL(clicked(bool)), SLOT(larger())));
_zoom->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
sp = _zoom->sizePolicy();
sp.setHorizontalPolicy(QSizePolicy::Minimum);
_zoom->setSizePolicy(sp);
_zoom->setMinimum(10);
_zoom->setMaximum(190);
_zoom->setValue(100);
@ -127,14 +129,13 @@ class Browser: public QMainWindow, protected Ui::Browser {
QHBoxLayout* layout(new QHBoxLayout);
urlFrame->setLayout(layout);
_toolbar->addWidget(urlFrame);
urlFrame->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
layout->addWidget(_url);
combo->setInsertPolicy(QComboBox::NoInsert);
combo->setLineEdit(new ButtonLineEdit(combo));
combo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
combo->setSizePolicy(QSizePolicy::MinimumExpanding,
QSizePolicy::Preferred);
sp=combo->sizePolicy();
sp.setHorizontalPolicy(QSizePolicy::Expanding);
combo->setSizePolicy(sp);
combo->setEditable(!_kiosk);
assert(connect(combo, SIGNAL(currentIndexChanged(const QString&)),
SLOT(load(QString))));
@ -177,16 +178,11 @@ class Browser: public QMainWindow, protected Ui::Browser {
searchFrame->setLayout(layout);
_toolbar->addWidget(searchFrame);
_search->add(actionSearch);
_searchEngines->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
_search->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
searchFrame->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
}
if (!_quirks) _search->add(actionClearSearch);
_search->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
QSizePolicy::Minimum));
sp=_search->sizePolicy();
sp.setHorizontalPolicy(QSizePolicy::Minimum);
_search->setSizePolicy(sp);
assert(connect(_search, SIGNAL(returnPressed()),
SLOT(on_actionSearch_triggered())));
if (_quirks) {

Loading…
Cancel
Save