GUI: fix result table placement relative to the new sidefilters section

This commit is contained in:
Jean-Francois Dockes 2022-03-11 08:11:45 +01:00
parent 53b8b7e237
commit 3bbe5069d6
2 changed files with 19 additions and 9 deletions

View File

@ -94,13 +94,19 @@
</item>
</layout>
</widget>
<widget class="ResList" name="reslist" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QWidget" name="resultsLayoutWidget">
<layout class="QHBoxLayout" name="resultsHLayout">
<item>
<widget class="ResList" name="reslist" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
@ -249,7 +255,7 @@
<string>&amp;Advanced Search</string>
</property>
<property name="toolTip">
<string>Advanced/complex Search</string>
<string>Assisted complex search</string>
</property>
<property name="name" stdset="0">
<cstring>toolsAdvanced_SearchAction</cstring>

View File

@ -162,7 +162,7 @@ void RclMain::init()
setupCategoryFiltering();
restable = new ResTable(this);
verticalLayout->insertWidget(2, restable);
resultsHLayout->insertWidget(1, restable);
actionShowResultsAsTable->setChecked(prefs.showResultsAsTable);
on_actionShowResultsAsTable_toggled(prefs.showResultsAsTable);
@ -289,6 +289,10 @@ void RclMain::init()
sizes << 200 << 600;
sideFiltersSPLT->setSizes(sizes);
}
// We don't want the side filters part of the splitter to change width when the window is
// resized
sideFiltersSPLT->setStretchFactor(0, 0);
sideFiltersSPLT->setStretchFactor(1, 1);
populateSideFilters(true);