diff options
author | Oliver Specht <oliver.specht@cib.de> | 2024-04-03 14:57:29 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-04-04 17:24:54 +0200 |
commit | 29750e249530eec0b3e00ceb75e668ad22b21cae (patch) | |
tree | 2f3bfc94f50988482c95b7c811e318722edff35b /sw/source/ui/fldui/fldvar.cxx | |
parent | 23f13bc8c1aba9e53789180ef09ed06594ea4649 (diff) |
improve usability of variable fields
The value field of the Variables page of the field dialog is changed
into a scrollable field to enhance usability in combination with longer
values of variable or user fields
Change-Id: Ib268cf22ff54604214fb090c3c93b7d145a9c9a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165750
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw/source/ui/fldui/fldvar.cxx')
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 13265523ba17..4190aa81f29c 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -47,7 +47,7 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p , m_xNameFT(m_xBuilder->weld_label("nameft")) , m_xNameED(m_xBuilder->weld_entry("name")) , m_xValueFT(m_xBuilder->weld_label("valueft")) - , m_xValueED(new ConditionEdit(m_xBuilder->weld_entry("value"))) + , m_xValueED(new ConditionEdit<weld::TextView>(m_xBuilder->weld_text_view("value"))) , m_xFormat(m_xBuilder->weld_widget("formatframe")) , m_xNumFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("numformat"))) , m_xFormatLB(m_xBuilder->weld_tree_view("format")) @@ -71,6 +71,9 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p m_xSelectionLB->set_size_request(nWidth, nHeight); m_xFormatLB->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(3)); + m_sOldValueFT = m_xValueFT->get_label(); m_sOldNameFT = m_xNameFT->get_label(); @@ -148,7 +151,6 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) m_xFormatLB->connect_row_activated(LINK(this, SwFieldVarPage, TreeViewInsertHdl)); m_xNumFormatLB->connect_row_activated(LINK(this, SwFieldVarPage, TreeViewInsertHdl)); m_xNameED->connect_changed(LINK(this, SwFieldVarPage, ModifyHdl)); - m_xValueED->connect_changed(LINK(this, SwFieldVarPage, ModifyHdl)); m_xNewPB->connect_clicked(LINK(this, SwFieldVarPage, TBClickHdl)); m_xDelPB->connect_clicked(LINK(this, SwFieldVarPage, TBClickHdl)); m_xChapterLevelLB->connect_changed(LINK(this, SwFieldVarPage, ChapterHdl)); |