On 29/10/2018 14:12, Daniel wrote:
Attached is a patch for the Find & Replace (Quick) dialog for master. If the patch is works, I could proceed with the other dialog fixes.
Sorry, reordered checkboxes for no good reason... Daniel
From 3a91987679bae0211959101a6fd27d7e74c474df Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller <d....@web.de> Date: Mon, 29 Oct 2018 14:08:34 +0100 Subject: [PATCH] Fix for Find & Replace (Quick) dialog: - fixed maximum height to minimum height - uncouple buttons from checkboxes --- src/frontends/qt4/GuiSearch.cpp | 3 + src/frontends/qt4/ui/SearchUi.ui | 337 +++++++++++++++---------------- 2 files changed, 171 insertions(+), 169 deletions(-) diff --git a/src/frontends/qt4/GuiSearch.cpp b/src/frontends/qt4/GuiSearch.cpp index dd1a002fed..02678fae60 100644 --- a/src/frontends/qt4/GuiSearch.cpp +++ b/src/frontends/qt4/GuiSearch.cpp @@ -47,6 +47,9 @@ GuiSearch::GuiSearch(GuiView & lv) { setupUi(this); + // fix height to minimum + setFixedHeight(sizeHint().height()); + connect(buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(slotButtonBox(QAbstractButton *))); connect(findPB, SIGNAL(clicked()), this, SLOT(findClicked())); diff --git a/src/frontends/qt4/ui/SearchUi.ui b/src/frontends/qt4/ui/SearchUi.ui index ebc00e3cfc..dacf2a152f 100644 --- a/src/frontends/qt4/ui/SearchUi.ui +++ b/src/frontends/qt4/ui/SearchUi.ui @@ -16,48 +16,10 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QLabel" name="findLA"> - <property name="text"> - <string>Fi&nd:</string> - </property> - <property name="buddy"> - <cstring>findCO</cstring> - </property> - </widget> - </item> - <item row="0" column="2" colspan="2"> - <widget class="QComboBox" name="findCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> - </property> - <property name="editable"> - <bool>true</bool> - </property> - <property name="maxCount"> - <number>666</number> - </property> - <property name="insertPolicy"> - <enum>QComboBox::InsertAtTop</enum> - </property> - <property name="autoCompletion"> - <bool>false</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="4" rowspan="5"> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0"> + <item row="0" column="2"> <widget class="QPushButton" name="findPB"> <property name="enabled"> <bool>false</bool> @@ -70,151 +32,188 @@ </property> </widget> </item> - <item> - <widget class="QPushButton" name="replacePB"> - <property name="enabled"> - <bool>false</bool> + <item row="0" column="0"> + <widget class="QLabel" name="findLA"> + <property name="text"> + <string>Fi&nd:</string> + </property> + <property name="buddy"> + <cstring>findCO</cstring> </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="replaceLA"> <property name="text"> - <string>&Replace</string> + <string>Repla&ce with:</string> + </property> + <property name="buddy"> + <cstring>replaceCO</cstring> </property> </widget> </item> - <item> - <widget class="QPushButton" name="replaceallPB"> - <property name="enabled"> + <item row="0" column="1"> + <widget class="QComboBox" name="findCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="editable"> + <bool>true</bool> + </property> + <property name="maxCount"> + <number>666</number> + </property> + <property name="insertPolicy"> + <enum>QComboBox::InsertAtTop</enum> + </property> + <property name="autoCompletion"> <bool>false</bool> </property> - <property name="text"> - <string>Replace &All</string> + <property name="duplicatesEnabled"> + <bool>false</bool> </property> </widget> </item> - <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="standardButtons"> - <set>QDialogButtonBox::Close</set> + <item row="1" column="1"> + <widget class="QComboBox" name="replaceCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="editable"> + <bool>true</bool> + </property> + <property name="maxCount"> + <number>666</number> + </property> + <property name="insertPolicy"> + <enum>QComboBox::InsertAtTop</enum> + </property> + <property name="autoCompletion"> + <bool>false</bool> + </property> + <property name="duplicatesEnabled"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="replacePB"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Replace</string> </property> </widget> </item> </layout> </item> - <item row="1" column="0" colspan="2"> - <widget class="QLabel" name="replaceLA"> - <property name="text"> - <string>Repla&ce with:</string> - </property> - <property name="buddy"> - <cstring>replaceCO</cstring> - </property> - </widget> - </item> - <item row="1" column="2" colspan="2"> - <widget class="QComboBox" name="replaceCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="editable"> - <bool>true</bool> - </property> - <property name="maxCount"> - <number>666</number> - </property> - <property name="insertPolicy"> - <enum>QComboBox::InsertAtTop</enum> - </property> - <property name="autoCompletion"> - <bool>false</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="2" column="0" colspan="3"> - <widget class="QCheckBox" name="caseCB"> - <property name="text"> - <string>Case &sensitive[[search]]</string> - </property> - </widget> - </item> - <item row="2" column="3"> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="3" column="0" colspan="3"> - <widget class="QCheckBox" name="wordsCB"> - <property name="text"> - <string>Match w&hole words only</string> - </property> - </widget> - </item> - <item row="4" column="0" colspan="3"> - <widget class="QCheckBox" name="backwardsCB"> - <property name="text"> - <string>Search &backwards</string> - </property> - </widget> - </item> - <item row="5" column="1"> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="5" column="4"> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3" stretch="1,0"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QCheckBox" name="caseCB"> + <property name="text"> + <string>Case &sensitive[[search]]</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="wordsCB"> + <property name="text"> + <string>Match w&hole words only</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="backwardsCB"> + <property name="text"> + <string>Search &backwards</string> + </property> + </widget> + </item> + <item> + <spacer> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QPushButton" name="replaceallPB"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Replace &All</string> + </property> + </widget> + </item> + <item> + <spacer> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Close</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> </item> </layout> </widget> - <tabstops> - <tabstop>findCO</tabstop> - <tabstop>replaceCO</tabstop> - <tabstop>caseCB</tabstop> - <tabstop>wordsCB</tabstop> - <tabstop>backwardsCB</tabstop> - <tabstop>findPB</tabstop> - <tabstop>replacePB</tabstop> - <tabstop>replaceallPB</tabstop> - </tabstops> <includes> <include location="local">qt_i18n.h</include> </includes> -- 2.17.0.windows.1