summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Suo <suokunlong@126.com>2020-12-18 19:42:29 +0800
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-01-05 00:30:04 +0100
commitb6178d47ec1ec2cdd91727fe5fd792f6248d0222 (patch)
treef495331bba7bed78741fe62f71b367ec4db3ee1d
parentabc2a0563d33726c10c6cc10c1b879d635453b61 (diff)
tdf#130275: Fields dialog is too tall
...which makes the OK/Cancel buttons invisible under small displays. This commit changed the height of these widgets. Also I did some tweats to the UI file and the width so that the edit dialog of these fields looks nicer (at least on my display). Change-Id: I9f39727afd566d75db525c5a5cafe2eabb66d7ea (cherry picked from commit f6903d55d46037b15e3f4d09d15e4aa349d5582e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108024 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx4
-rw-r--r--sw/source/ui/fldui/flddok.cxx4
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx6
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/uiconfig/swriter/ui/flddocinfopage.ui2
-rw-r--r--sw/uiconfig/swriter/ui/flddocumentpage.ui2
8 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 99a7d5f05b3b..e2097cb77291 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -52,7 +52,7 @@ SwFieldDBPage::SwFieldDBPage(weld::Container* pPage, weld::DialogController* pCo
m_xFormatLB->make_sorted();
auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- auto nHeight = m_xTypeLB->get_height_rows(14);
+ auto nHeight = m_xTypeLB->get_height_rows(10);
m_xTypeLB->set_size_request(nWidth, nHeight);
m_xDatabaseTLB->set_size_request(nWidth*2, nHeight);
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 9bb8e08cf737..35d4b5a00ae4 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -63,9 +63,9 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl
FillFieldSelect(*m_xSelectionLB);
auto nWidth = m_xTypeTLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- auto nHeight = m_xTypeTLB->get_height_rows(20);
+ auto nHeight = m_xTypeTLB->get_height_rows(10);
m_xTypeTLB->set_size_request(nWidth, nHeight);
- m_xFormatLB->get_widget().set_size_request(nWidth, nHeight);
+ m_xFormatLB->get_widget().set_size_request(nWidth * 2, nHeight);
m_xSelectionLB->set_size_request(nWidth, nHeight);
//enable 'active' language selection
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 5c6bc57e70aa..7164c4ff2692 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -53,11 +53,11 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p
m_xFormatLB->make_sorted();
auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- auto nHeight = m_xTypeLB->get_height_rows(20);
+ auto nHeight = m_xTypeLB->get_height_rows(10);
m_xTypeLB->set_size_request(nWidth, nHeight);
m_xSelectionLB->set_size_request(nWidth, nHeight);
- m_xFormatLB->set_size_request(nWidth, nHeight);
+ m_xFormatLB->set_size_request(nWidth * 2, nHeight);
m_xSelectionLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl));
m_xFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl));
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index c2e6cbef2572..9e61530b172a 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -68,7 +68,7 @@ SwFieldFuncPage::SwFieldFuncPage(weld::Container* pPage, weld::DialogController*
m_xListItemsLB->get_height_rows(5));
auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- auto nHeight = m_xTypeLB->get_height_rows(20);
+ auto nHeight = m_xTypeLB->get_height_rows(10);
m_xTypeLB->set_size_request(nWidth, nHeight);
m_xFormatLB->set_size_request(nWidth, nHeight);
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 6c92d6f4d07a..6cd7cc6e6720 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -82,10 +82,10 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, weld::DialogController* p
auto nHeight = m_xTypeLB->get_height_rows(8);
auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- m_xTypeLB->set_size_request(nWidth, nHeight);
- m_xFormatLB->set_size_request(nWidth, nHeight);
+ m_xTypeLB->set_size_request(nWidth * 1.33, nHeight);
+ m_xFormatLB->set_size_request(nWidth * 1.33, nHeight);
m_xSelection->set_size_request(nWidth * 2, nHeight);
- nHeight = m_xTypeLB->get_height_rows(20);
+ nHeight = m_xTypeLB->get_height_rows(8);
m_xSelectionToolTipLB->set_size_request(nHeight, nWidth*2);
m_xTypeLB->clear();
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 7697e4413da7..98fe430c2d3b 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -64,7 +64,7 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p
FillFieldSelect(*m_xFormatLB);
auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
- auto nHeight = m_xTypeLB->get_height_rows(20);
+ auto nHeight = m_xTypeLB->get_height_rows(10);
m_xTypeLB->set_size_request(nWidth, nHeight);
m_xSelectionLB->set_size_request(nWidth, nHeight);
m_xFormatLB->set_size_request(nWidth, nHeight/2);
diff --git a/sw/uiconfig/swriter/ui/flddocinfopage.ui b/sw/uiconfig/swriter/ui/flddocinfopage.ui
index 16b0151d5090..f45ef7350295 100644
--- a/sw/uiconfig/swriter/ui/flddocinfopage.ui
+++ b/sw/uiconfig/swriter/ui/flddocinfopage.ui
@@ -33,7 +33,7 @@
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
- <property name="homogeneous">True</property>
+ <property name="homogeneous">False</property>
<child>
<object class="GtkFrame" id="typeframe">
<property name="visible">True</property>
diff --git a/sw/uiconfig/swriter/ui/flddocumentpage.ui b/sw/uiconfig/swriter/ui/flddocumentpage.ui
index 35c2f91c8577..4686fd863284 100644
--- a/sw/uiconfig/swriter/ui/flddocumentpage.ui
+++ b/sw/uiconfig/swriter/ui/flddocumentpage.ui
@@ -53,7 +53,7 @@
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
- <property name="homogeneous">True</property>
+ <property name="homogeneous">False</property>
<child>
<object class="GtkFrame" id="typeframe">
<property name="visible">True</property>