summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-05 10:24:06 +0000
committerSzymon Kłos <szymon.klos@collabora.com>2021-05-25 12:12:30 +0200
commita930a462eb27e14e014c177d0665dad18a6b9b20 (patch)
tree38a86ebbb5a73d8970b8cc62c29aa33d2055c30e /sd
parent029bdf4736606361863055c3b200ddcc1b07b00d (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>
Diffstat (limited to 'sd')
-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 d1bd8fbae9cf..bee5a2190f9c 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -64,8 +64,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 7e587d02f739..c8917c827688 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -662,6 +662,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)