diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-07 12:21:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-04-21 10:19:41 +0200 |
commit | 2e0a32b51681fb356699b4a722f461f55a46b890 (patch) | |
tree | ac96e726d777aba5b6f57513f5b00b3d766e34d3 /sd/source/ui/animations | |
parent | 6c559b122add7db32b06faa15854df58b30460f6 (diff) |
weld FontNameBox
with custom row rendering
Change-Id: Ia909b5b9ad56b6ea4611e9ea0a1e2cb0064a8cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91841
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 68ecf1362ce9..3b4c3b3afaa6 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -230,6 +230,7 @@ private: OUString msEffectName; CustomAnimationEffectPtr mpEffect; +public: static const long nIconWidth = 19; static const long nItemMinHeight = 38; }; @@ -275,6 +276,8 @@ IMPL_STATIC_LINK(CustomAnimationList, CustomGetSizeHdl, weld::TreeView::get_size const OUString& rId = aPayload.second; CustomAnimationListEntryItem* pItem = reinterpret_cast<CustomAnimationListEntryItem*>(rId.toInt64()); + if (!pItem) + return Size(CustomAnimationListEntryItem::nIconWidth, CustomAnimationListEntryItem::nItemMinHeight); return pItem->GetSize(rRenderContext); } @@ -426,7 +429,6 @@ CustomAnimationList::CustomAnimationList(std::unique_ptr<weld::TreeView> xTreeVi mxEmptyLabel->set_stack_background(); mxTreeView->set_selection_mode(SelectionMode::Multiple); - mxTreeView->set_column_custom_renderer(0); mxTreeView->connect_changed(LINK(this, CustomAnimationList, SelectHdl)); mxTreeView->connect_key_press(LINK(this, CustomAnimationList, KeyInputHdl)); mxTreeView->connect_popup_menu(LINK(this, CustomAnimationList, CommandHdl)); @@ -436,6 +438,7 @@ CustomAnimationList::CustomAnimationList(std::unique_ptr<weld::TreeView> xTreeVi mxTreeView->connect_drag_begin(LINK(this, CustomAnimationList, DragBeginHdl)); mxTreeView->connect_custom_get_size(LINK(this, CustomAnimationList, CustomGetSizeHdl)); mxTreeView->connect_custom_render(LINK(this, CustomAnimationList, CustomRenderHdl)); + mxTreeView->set_column_custom_renderer(0); } CustomAnimationListDropTarget::CustomAnimationListDropTarget(CustomAnimationList& rTreeView) |