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

Loading…
Cancel
Save