Fix problems with layout and SearchBanner

This commit is contained in:
Grégory Soutadé 2012-05-12 11:02:37 +02:00
parent 8c61a32a6f
commit 434f1707c7
4 changed files with 10 additions and 3 deletions

View File

@ -318,7 +318,7 @@ void AccountPanel::InitStatsGrid(User* user)
_statsGrid->item(BALANCE, 1)->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); _statsGrid->item(BALANCE, 1)->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
_statsGrid->item(NON_FIX, 1)->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); _statsGrid->item(NON_FIX, 1)->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
_accountsGrid->resizeColumnToContents(0); _statsGrid->resizeColumnToContents(0);
} }
void AccountPanel::ChangeUser() void AccountPanel::ChangeUser()

View File

@ -52,7 +52,7 @@ ExportPanel::ExportPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent
hbox->addLayout(vbox2); hbox->addLayout(vbox2);
vbox->addLayout(hbox); vbox->addLayout(hbox, 2);
} }
ExportPanel::~ExportPanel() ExportPanel::~ExportPanel()

View File

@ -41,12 +41,14 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
_calendarFrom->setFirstDayOfWeek(Qt::Monday); _calendarFrom->setFirstDayOfWeek(Qt::Monday);
// _calendarFrom->setNavigationBarVisible(false); // _calendarFrom->setNavigationBarVisible(false);
_calendarFrom->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader); _calendarFrom->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
_calendarFrom->setMaximumSize(_calendarFrom->sizeHint());
_calendarTo = new QCalendarWidget(this); _calendarTo = new QCalendarWidget(this);
_calendarTo->setGridVisible(false); _calendarTo->setGridVisible(false);
_calendarTo->setFirstDayOfWeek(Qt::Monday); _calendarTo->setFirstDayOfWeek(Qt::Monday);
// _calendarTo->setNavigationBarVisible(false); // _calendarTo->setNavigationBarVisible(false);
_calendarTo->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader); _calendarTo->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
_calendarTo->setMaximumSize(_calendarTo->sizeHint());
_description = new QLineEdit(this); _description = new QLineEdit(this);
@ -65,6 +67,7 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
item = new QListWidgetItem(_(categoryIt->name.toStdString().c_str()), _category); item = new QListWidgetItem(_(categoryIt->name.toStdString().c_str()), _category);
item->setCheckState (Qt::Unchecked); item->setCheckState (Qt::Unchecked);
} }
_category->setMaximumSize(_category->sizeHint());
_optype = new QListWidget(this); _optype = new QListWidget(this);
item = new QListWidgetItem(_("Fix"), _optype); item = new QListWidgetItem(_("Fix"), _optype);
@ -75,6 +78,7 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
item->setCheckState (Qt::Unchecked); item->setCheckState (Qt::Unchecked);
item = new QListWidgetItem(_("Not checked"), _optype); item = new QListWidgetItem(_("Not checked"), _optype);
item->setCheckState (Qt::Unchecked); item->setCheckState (Qt::Unchecked);
_optype->setMaximumSize(_optype->sizeHint());
_account = new QListWidget(this); _account = new QListWidget(this);
item = new QListWidgetItem(_("Unknown"), _account); item = new QListWidgetItem(_("Unknown"), _account);
@ -84,6 +88,7 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
item = new QListWidgetItem(accountIt->name, _account); item = new QListWidgetItem(accountIt->name, _account);
item->setCheckState (Qt::Unchecked); item->setCheckState (Qt::Unchecked);
} }
_account->setMaximumSize(_account->sizeHint());
QLabel* labelDescription = new QLabel(_("Description")); QLabel* labelDescription = new QLabel(_("Description"));
QLabel* labelAmountFrom = new QLabel(_("Amount from")); QLabel* labelAmountFrom = new QLabel(_("Amount from"));
@ -108,6 +113,8 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
gridBagSizer->addWidget(_optype, 1, 6); gridBagSizer->addWidget(_optype, 1, 6);
gridBagSizer->addWidget(labelAccount, 0, 7); gridBagSizer->addWidget(labelAccount, 0, 7);
gridBagSizer->addWidget(_account, 1, 7); gridBagSizer->addWidget(_account, 1, 7);
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
} }
SearchBanner::~SearchBanner() SearchBanner::~SearchBanner()

View File

@ -58,7 +58,7 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent
hbox->addLayout(vbox2); hbox->addLayout(vbox2);
vbox->addLayout(hbox); vbox->addLayout(hbox, 2);
} }
SearchPanel::~SearchPanel() SearchPanel::~SearchPanel()