summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-05 10:24:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-05 15:42:04 +0100
commit4414466e876d857489638673f3eb86060587b4c3 (patch)
treef3542529de63e6728f3420b52b50fa304a7f0d66
parentbde7232cc3ce6b23b0d43314e690907d2282d45c (diff)
don't use the vcl::Window parent to derive a treeview size
Change-Id: Ic366a90fbdcd735d377c8a00766cdfa0add31c5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111998 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 8d9023acdb89..aa8d9cf273c6 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -59,8 +59,6 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings)
, meDragType ( NAVIGATOR_DRAGTYPE_EMBEDDED )
, mpBindings ( pInBindings )
{
- Size aSize(LogicToPixel(Size(97, 67), MapMode(MapUnit::MapAppFont)));
- mxTlbObjects->set_size_request(aSize.Width(), aSize.Height());
mxTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() );
mxTlbObjects->connect_row_activated(LINK(this, SdNavigatorWin, ClickObjectHdl));
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 992fb8e29cf2..576117dfe89f 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -659,6 +659,9 @@ SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView)
m_xTreeView->connect_key_press(LINK(this, SdPageObjsTLV, KeyInputHdl));
m_xTreeView->connect_mouse_press(LINK(this, SdPageObjsTLV, MousePressHdl));
m_xTreeView->connect_mouse_release(LINK(this, SdPageObjsTLV, MouseReleaseHdl));
+
+ m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 28,
+ m_xTreeView->get_text_height() * 8);
}
IMPL_LINK_NOARG(SdPageObjsTLV, SelectHdl, weld::TreeView&, void)