summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2017-01-21 13:23:34 +0100
committerHeiko Tietze <tietze.heiko@googlemail.com>2017-02-03 01:08:01 +0000
commit789ed159fb03eef26c991f361380d0eb7b509cd9 (patch)
tree8fccb6fe1a1f571d16d3ed9f23180385d48fee8c
parenteb9b9c28ed32cacb5ed0410875af2ec03345fbf9 (diff)
tdf#105371, tdf#99456 Alignment in find & replace dialog
Fix width of labels removed and code added to define it on runtime Fix height of buttons commented out Resizable flag unset Change-Id: I3ffb38b5c9b23447ac914dc8c13fa95072897ced Reviewed-on: https://gerrit.libreoffice.org/33370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
-rw-r--r--include/svx/srchdlg.hxx3
-rw-r--r--svx/source/dialog/srchdlg.cxx16
-rw-r--r--svx/uiconfig/ui/findreplacedialog.ui22
3 files changed, 27 insertions, 14 deletions
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 25798fd0837c..154e201b27e4 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -202,6 +202,9 @@ private:
VclPtr<RadioButton> m_pColumnsBtn;
VclPtr<CheckBox> m_pAllSheetsCB;
+ VclPtr<FixedText> m_pFindLabel;
+ VclPtr<FixedText> m_pReplaceLabel;
+
SfxBindings& rBindings;
bool bWriter;
bool bSearch;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 02f7f7add5fe..b2ca9e0ddb75 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -333,8 +333,18 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi
get(m_pColumnsBtn, "cols");
get(m_pAllSheetsCB, "allsheets");
- m_pSimilarityBtn->set_height_request(m_pSimilarityBox->get_preferred_size().Height());
- m_pJapOptionsBtn->set_height_request(m_pJapOptionsCB->get_preferred_size().Height());
+ //align find and replace inputs without a predefined with for the labels
+ get(m_pFindLabel, "label4"); //"Find:"
+ get(m_pReplaceLabel, "label5"); //"Replace:"
+ long nFindWidth = m_pFindLabel->get_preferred_size().Width();
+ long nReplaceWidth = m_pReplaceLabel->get_preferred_size().Width();
+ if ( nFindWidth > nReplaceWidth)
+ m_pReplaceLabel->set_width_request(nFindWidth);
+ else
+ m_pFindLabel->set_width_request(nReplaceWidth);
+
+ // m_pSimilarityBtn->set_height_request(m_pSimilarityBox->get_preferred_size().Height());
+ // m_pJapOptionsBtn->set_height_request(m_pJapOptionsCB->get_preferred_size().Height());
long nTermWidth = approximate_char_width() * 32;
m_pSearchLB->set_width_request(nTermWidth);
@@ -412,6 +422,8 @@ void SvxSearchDialog::dispose()
m_pRowsBtn.clear();
m_pColumnsBtn.clear();
m_pAllSheetsCB.clear();
+ m_pFindLabel.clear();
+ m_pReplaceLabel.clear();
SfxModelessDialog::dispose();
}
diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui
index 733fc52d8cb7..358848d5af5e 100644
--- a/svx/uiconfig/ui/findreplacedialog.ui
+++ b/svx/uiconfig/ui/findreplacedialog.ui
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="FindReplaceDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Find &amp; Replace</property>
+ <property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox3">
@@ -127,15 +128,14 @@
</child>
<child>
<object class="GtkLabel" id="label4">
- <property name="width_request">80</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="xalign">0</property>
- <property name="yalign">0.40000000596046448</property>
<property name="label" translatable="yes">_Find:</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.40000000596046448</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -150,9 +150,9 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property>
+ <property name="wrap">True</property>
<property name="xalign">0</property>
<property name="yalign">0.55000001192092896</property>
- <property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -164,9 +164,9 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
<property name="wrap">True</property>
<property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -358,14 +358,13 @@
</child>
<child>
<object class="GtkLabel" id="label5">
- <property name="width_request">80</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Re_place:</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -381,8 +380,8 @@
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
<property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -846,7 +845,6 @@
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
- <property name="margin_right">25</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
@@ -942,9 +940,9 @@
<object class="GtkLabel" id="searchinlabel">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Search i_n:</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -984,9 +982,9 @@
<object class="GtkLabel" id="searchdir">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Direction:</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>