Change SearchWidget to use a grid layout and remove double margins.

This commit is contained in:
Felix Geyer 2012-05-27 16:15:54 +02:00
parent 089bcba89f
commit 3e72cd11a3
2 changed files with 53 additions and 30 deletions

View File

@ -503,10 +503,12 @@ void DatabaseWidget::showSearch()
Q_ASSERT(m_lastGroup); Q_ASSERT(m_lastGroup);
if (m_lastGroup == m_db->rootGroup()) { if (m_lastGroup == m_db->rootGroup()) {
m_searchUi->optionsWidget->hide();
m_searchUi->searchCurrentRadioButton->hide(); m_searchUi->searchCurrentRadioButton->hide();
m_searchUi->searchRootRadioButton->hide(); m_searchUi->searchRootRadioButton->hide();
} }
else { else {
m_searchUi->optionsWidget->show();
m_searchUi->searchCurrentRadioButton->show(); m_searchUi->searchCurrentRadioButton->show();
m_searchUi->searchRootRadioButton->show(); m_searchUi->searchRootRadioButton->show();
m_searchUi->searchCurrentRadioButton->setText(tr("Current group") m_searchUi->searchCurrentRadioButton->setText(tr("Current group")

View File

@ -10,7 +10,13 @@
<height>87</height> <height>87</height>
</rect> </rect>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="1">
<widget class="LineEdit" name="searchEdit"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -32,11 +38,12 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="1">
<widget class="LineEdit" name="searchEdit"/>
</item>
<item row="1" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout2"> <widget class="QWidget" name="optionsWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item> <item>
<widget class="QCheckBox" name="caseSensitiveCheckBox"> <widget class="QCheckBox" name="caseSensitiveCheckBox">
<property name="text"> <property name="text">
@ -61,7 +68,21 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>255</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>