diff options
author | Sumit Chauhan <sumitcn25@gmail.com> | 2019-02-09 13:16:50 +0530 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2020-09-23 12:59:19 +0200 |
commit | c3997a03d41b5bd92b52cfc852dac56c6175c735 (patch) | |
tree | 3126a4a8c7daf9dd53cd61cbd44dbb9963e218c5 | |
parent | 699015a094aa2f838d95ec79650e9de91161c6c5 (diff) |
tdf#120495 Providing self adapting height to the Area section of Sidebar
This problem comes when we switch between different fill tabs in area sidebar and
this patch solves the issue.
Change-Id: I09936e600214394d26a27d26d47be3ef9942b65f
Reviewed-on: https://gerrit.libreoffice.org/67577
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 347afce3a997291313fd88843ba248ccbbcb3990)
Reviewed-on: https://gerrit.libreoffice.org/75483
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 6d3dfe83c82860c0688fd8c8dcc250402df53c74)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103231
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r-- | include/svx/sidebar/AreaPropertyPanelBase.hxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index 5736617080f8..eb02b7a33823 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -44,6 +44,7 @@ #include <svl/intitem.hxx> #include <com/sun/star/ui/XUIElement.hpp> #include <svx/svxdllapi.h> +#include <sfx2/sidebar/Panel.hxx> class XFillFloatTransparenceItem; class XFillTransparenceItem; @@ -155,6 +156,7 @@ protected: Image maImgLinear; VclPtr<AreaTransparencyGradientPopup> mxTrGrPopup; + VclPtr<sfx2::sidebar::Panel> mpPanel; std::unique_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem; std::unique_ptr< SfxUInt16Item > mpTransparanceItem; diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 0e911e47b1e9..f84f38fdec59 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -106,6 +106,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( get(mpLbFillGradTo, "fillgrad2"); get(mpGradientStyle, "gradientstyle"); get(mpBmpImport, "bmpimport"); + mpPanel = dynamic_cast<sfx2::sidebar::Panel*>(pParent); Initialize(); } @@ -132,6 +133,7 @@ void AreaPropertyPanelBase::dispose() mpLbFillGradTo.clear(); mpGradientStyle.clear(); mpBmpImport.clear(); + mpPanel.clear(); PanelLayout::dispose(); } @@ -443,6 +445,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) { mpLbFillType->Selected(); } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, void) @@ -605,6 +609,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl() break; } } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::ImpUpdateTransparencies() @@ -860,6 +866,8 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, bool bDefaultOrSet, mpToolBoxColor->Hide(); meLastXFS = static_cast<sal_uInt16>(-1); mpStyleItem.reset(); + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState) @@ -899,6 +907,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSe mpLbFillGradTo->SetNoSelection(); } } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState) @@ -930,6 +940,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet, mpLbFillAttr->SetNoSelection(); } } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolItem* pState) @@ -947,6 +959,8 @@ void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolIte mpLbFillType->SelectEntryPos(SOLID); Update(); } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState) @@ -980,6 +994,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet, mpLbFillAttr->SetNoSelection(); } } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } void AreaPropertyPanelBase::NotifyItemUpdate( @@ -1247,6 +1263,8 @@ void AreaPropertyPanelBase::Update() OSL_ENSURE(false, "Non supported FillType (!)"); break; } + if(mpPanel) + mpPanel->TriggerDeckLayouting(); } IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void) |