sfx2/source/doc/templatedlg.cxx |    3 +++
 sfx2/uiconfig/ui/templatedlg.ui |    3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 410bff99a708371eed6a82677b44e2151a4a990a
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Sat Jul 9 00:43:13 2022 +0200
Commit:     Rafael Lima <rafael.palma.l...@gmail.com>
CommitDate: Thu Aug 18 13:47:14 2022 +0200

    tdf#149768 Do not fix Templates dialog width and height in pixels
    
    This patch removes the fixed size of the Templates dialog in pixels so it 
works better in HiDPI displays.
    
    This patch also makes the dialog a bit wider and non-resizable.
    
    Change-Id: I256d8d5c8b76c8e32a4f008f3a235f80bf59634d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136922
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index ac3015ceb8c0..42e570e75dfb 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -203,6 +203,9 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window 
*pParent)
 
     mxLocalView->ShowTooltips(true);
 
+    // Set width and height of the templates thumbnail viewer to acommodate 3 
rows and 4 columns of items
+    mxLocalViewWeld->set_size_request(TEMPLATE_ITEM_MAX_WIDTH * 5, 
TEMPLATE_ITEM_MAX_HEIGHT_SUB * 3);
+
     mxOKButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, OkClickHdl));
     // FIXME: rather than disabling make 
dispatchCommand(".uno:AdditionsDialog") work in start center
     if ( !SfxModule::GetActiveModule() )
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 013eacb2a467..7f7fe31d6371 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -39,11 +39,10 @@
     </columns>
   </object>
   <object class="GtkDialog" id="TemplateDialog">
-    <property name="width-request">740</property>
-    <property name="height-request">500</property>
     <property name="can-focus">False</property>
     <property name="border-width">6</property>
     <property name="title" translatable="yes" 
context="templatedlg|TemplateDialog">Templates</property>
+    <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="default-width">0</property>
     <property name="default-height">0</property>

Reply via email to