diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-05 10:16:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-05 14:46:29 +0100 |
commit | 59f9e22c992118de9fe676cf3161c0eecd8b63dd (patch) | |
tree | 79543289ac885ad35627347cd98b0e1a67f56825 /sc | |
parent | 3b2efb70b65906a4a3c521f5cc387fc62cbef230 (diff) |
don't use the vcl::Window parent to derive a treeview size
Change-Id: Idee74fbdf45574fbb7997498062aaac0fb11eb74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111996
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/content.hxx | 10 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 4 |
3 files changed, 5 insertions, 14 deletions
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index ca1e5a1c6e0c..a32aab9f48a2 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -127,16 +127,6 @@ public: void ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry = nullptr); void SetNavigatorDlgFlag(bool isInNavigateDlg){ bisInNavigatoeDlg=isInNavigateDlg;}; - void set_selection_mode(SelectionMode eMode) - { - m_xTreeView->set_selection_mode(eMode); - } - - void set_size_request(int nWidth, int nHeight) - { - m_xTreeView->set_size_request(nWidth, nHeight); - } - void hide() { m_xTreeView->hide(); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 823ea306ae87..8a9b221ab8d0 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -146,6 +146,11 @@ ScContentTree::ScContentTree(std::unique_ptr<weld::TreeView> xTreeView, ScNaviga m_xTreeView->enable_drag_source(xHelper, DND_ACTION_COPY | DND_ACTION_LINK); m_xTreeView->connect_drag_begin(LINK(this, ScContentTree, DragBeginHdl)); + + m_xTreeView->set_selection_mode( SelectionMode::Single ); + + m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 30, + m_xTreeView->get_text_height() * 13); } ScContentTree::~ScContentTree() diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 5d3e7366f6f6..99594e9113b5 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -383,10 +383,6 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) StartListening( *(SfxGetpApp()) ); StartListening( rBindings ); - m_xLbEntries->set_selection_mode( SelectionMode::Single ); - Size aSize(LogicToPixel(Size(110, 100), MapMode(MapUnit::MapAppFont))); - m_xLbEntries->set_size_request(aSize.Width(), aSize.Height()); - // was a category chosen as root? ScContentId nLastRoot = rCfg.GetRootType(); if ( nLastRoot != ScContentId::ROOT ) |