summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-11-06 08:57:32 +0100
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-11-19 09:16:01 +0100
commitf5cb83c03339af0efbbf7f2a2fec0f93a7aeb16e (patch)
tree6ca69d9e02f050ce2e85d539e6492f860306808d
parent6cb711645b8d8f3cee0d3454e193cc7bf1cad305 (diff)
tdf#160621 tdf#162702 Variable field dialog page resize
Reduce the size of the upper boxes to get more space for the field value input. Fixes also tdf#162702 by setting the size also to the number format list box. Change-Id: I96cc38b30fa7afccf6ca009aad3b15f1f051d381 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176106 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
-rw-r--r--sw/source/ui/fldui/fldvar.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 52c045b9af7d..eaf1c52503c5 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -70,6 +70,7 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p
m_xTypeLB->set_size_request(nWidth, nHeight);
m_xSelectionLB->set_size_request(nWidth, nHeight);
m_xFormatLB->set_size_request(nWidth, nHeight/2);
+ m_xNumFormatLB->get_widget().set_size_request(nWidth, nHeight/2);
m_xValueED->get_widget().set_size_request(m_xValueED->get_widget().get_preferred_size().Width(),
m_xValueED->get_widget().get_height_rows(6));
@@ -121,6 +122,11 @@ void SwFieldVarPage::Reset(const SfxItemSet* )
}
else
{
+ auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
+ auto nHeight = m_xTypeLB->get_height_rows(8);
+ m_xTypeLB->set_size_request(nWidth, nHeight);
+ m_xSelectionLB->set_size_request(nWidth, nHeight);
+ m_xFormatLB->set_size_request(nWidth, nHeight/2);
const SwField* pCurField = GetCurField();
assert(pCurField && "<SwFieldVarPage::Reset(..)> - <SwField> instance missing!");
nTypeId = pCurField->GetTypeId();