diff options
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 11 | ||||
-rw-r--r-- | cui/uiconfig/ui/optlingupage.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/spelloptionsdialog.ui | 9 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 9 |
5 files changed, 29 insertions, 18 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index c0af1fc96957..cf074e6614b6 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -491,16 +491,16 @@ IMPL_LINK( SpellDialog, CheckGrammarHdl, Button*, pBox, void ) void SpellDialog::StartSpellOptDlg_Impl() { SfxItemSet aSet( SfxGetpApp()->GetPool(), svl::Items<SID_AUTOSPELL_CHECK,SID_AUTOSPELL_CHECK>{}); - ScopedVclPtr<SfxSingleTabDialog> pDlg( - VclPtr<SfxSingleTabDialog>::Create( - this, aSet, "SpellOptionsDialog", "cui/ui/spelloptionsdialog.ui")); - VclPtr<SfxTabPage> pPage = SvxLinguTabPage::Create( pDlg->get_content_area(), &aSet ); - static_cast<SvxLinguTabPage*>(pPage.get())->HideGroups( GROUP_MODULES ); - pDlg->SetTabPage( pPage ); - if(RET_OK == pDlg->Execute()) + SfxSingleTabDialogController aDlg(GetFrameWeld(), aSet, "cui/ui/spelloptionsdialog.ui", "SpellOptionsDialog"); + + TabPageParent aParent(aDlg.get_content_area(), &aDlg); + VclPtr<SfxTabPage> xPage = SvxLinguTabPage::Create(aParent, &aSet); + static_cast<SvxLinguTabPage*>(xPage.get())->HideGroups( GROUP_MODULES ); + aDlg.SetTabPage(xPage); + if (RET_OK == aDlg.run()) { InitUserDicts(); - const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); if(pOutSet) OfaTreeOptionsDialog::ApplyLanguageOptions(*pOutSet); } diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 241d679b2144..a35c8cd2dd81 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -930,10 +930,6 @@ SvxLinguTabPage::SvxLinguTabPage(TabPageParent pParent, const SfxItemSet& rSet) m_xLinguDicsCLB->set_column_fixed_widths(aWidths); m_xLinguOptionsCLB->set_column_fixed_widths(aWidths); - m_xLinguModulesCLB->set_size_request(-1, m_xLinguModulesCLB->get_height_rows(3)); - m_xLinguDicsCLB->set_size_request(-1, m_xLinguDicsCLB->get_height_rows(5)); - m_xLinguOptionsCLB->set_size_request(-1, m_xLinguOptionsCLB->get_height_rows(5)); - m_xLinguModulesCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl )); m_xLinguModulesCLB->connect_row_activated(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl)); m_xLinguModulesCLB->connect_toggled(LINK(this, SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl)); @@ -1343,6 +1339,13 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); m_xLinguOptionsCLB->thaw(); + + m_xLinguModulesCLB->set_size_request(m_xLinguModulesCLB->get_preferred_size().Width(), + m_xLinguModulesCLB->get_height_rows(3)); + m_xLinguDicsCLB->set_size_request(m_xLinguDicsCLB->get_preferred_size().Width(), + m_xLinguDicsCLB->get_height_rows(5)); + m_xLinguOptionsCLB->set_size_request(m_xLinguOptionsCLB->get_preferred_size().Width(), + m_xLinguOptionsCLB->get_height_rows(5)); } IMPL_LINK(SvxLinguTabPage, BoxDoubleClickHdl_Impl, weld::TreeView&, rBox, void) diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui index a3429fb6dd66..f2331ecb58d9 100644 --- a/cui/uiconfig/ui/optlingupage.ui +++ b/cui/uiconfig/ui/optlingupage.ui @@ -41,6 +41,8 @@ <object class="GtkGrid" id="OptLinguPage"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="border_width">6</property> <property name="row_spacing">12</property> <child> diff --git a/cui/uiconfig/ui/spelloptionsdialog.ui b/cui/uiconfig/ui/spelloptionsdialog.ui index f8668fdeac39..c715af03bda7 100644 --- a/cui/uiconfig/ui/spelloptionsdialog.ui +++ b/cui/uiconfig/ui/spelloptionsdialog.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="SpellOptionsDialog"> @@ -7,7 +7,11 @@ <property name="border_width">6</property> <property name="title" translatable="yes" context="spelloptionsdialog|SpellOptionsDialog">Options</property> <property name="resizable">False</property> + <property name="modal">True</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -80,8 +84,5 @@ <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> </interface> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 51deeb6064f0..9f8f474db032 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6495,15 +6495,20 @@ public: virtual Size get_preferred_size() const override { + Size aRet(-1, -1); GtkWidget* pParent = gtk_widget_get_parent(m_pWidget); if (GTK_IS_SCROLLED_WINDOW(pParent)) { - return Size(gtk_scrolled_window_get_min_content_width(GTK_SCROLLED_WINDOW(pParent)), + aRet = Size(gtk_scrolled_window_get_min_content_width(GTK_SCROLLED_WINDOW(pParent)), gtk_scrolled_window_get_min_content_height(GTK_SCROLLED_WINDOW(pParent))); } GtkRequisition size; gtk_widget_get_preferred_size(m_pWidget, nullptr, &size); - return Size(size.width, size.height); + if (aRet.Width() == -1) + aRet.setWidth(size.width); + if (aRet.Height() == -1) + aRet.setHeight(size.height); + return aRet; } virtual void set_visible(bool visible) override |