Resolves tdf#172039 & tdf#172036 - Show/hide transparency at sidebar

The area fill options NONE and USE_BACKGROUND do not allow transparency
settings and should hide the controls respectively. This amends the
patch 490c2fc608.

Change-Id: Idd41d6d60cc5a83e9a4fa57d2c9f8184bd021a45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205096
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
This commit is contained in:
Heiko Tietze
2026-05-12 13:01:46 +02:00
committed by Heiko Tietze
parent 48b9430f1b
commit ba75fb4629
2 changed files with 18 additions and 4 deletions
@@ -104,6 +104,7 @@ public:
private:
void Initialize();
void ShowTransparency(const bool bDoShow);
protected:
const css::uno::Reference<css::frame::XFrame>& mxFrame;
@@ -405,6 +405,14 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
m_pPanel->TriggerDeckLayouting();
}
void AreaPropertyPanelBase::ShowTransparency(const bool bDoShow)
{
mxLBTransType->set_visible(bDoShow);
mxTrspTextFT->set_visible(bDoShow);
mxMTRTransparent->set_visible(bDoShow);
mxSldTransparent->set_visible(bDoShow);
}
void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
{
sal_Int32 nPos = static_cast<eFillStyle>(mxLbFillType->get_active());
@@ -430,6 +438,8 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
default:
case NONE:
{
ShowTransparency(false);
if (bUpdateModel)
{
const XFillStyleItem aXFillStyleItem(drawing::FillStyle_NONE);
@@ -443,6 +453,7 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
case SOLID:
{
bShowToolBoxColor = true;
ShowTransparency(true);
if (bUpdateModel)
{
@@ -457,6 +468,8 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
}
case GRADIENT:
{
ShowTransparency(true);
bShowLbFillGradFrom = true;
bShowLbFillGradTo = true;
bShowGradientStyle = true;
@@ -547,6 +560,7 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
case HATCH:
{
bShowLbFillAttr = true;
ShowTransparency(true);
const SvxHatchListItem* pItem(pSh->GetItem(SID_HATCH_LIST));
if (pItem)
@@ -584,6 +598,8 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
case PATTERN:
{
bShowLbFillAttr = true;
ShowTransparency(true);
mxLbFillAttr->set_sensitive(true);
mxLbFillAttr->clear();
@@ -652,10 +668,7 @@ void AreaPropertyPanelBase::FillStyleChanged(bool bUpdateModel)
case USE_BACKGROUND:
{
// No transparencies here
mxLBTransType->hide();
mxTrspTextFT->hide();
mxMTRTransparent->hide();
mxSldTransparent->hide();
ShowTransparency(false);
mxBTNGradient->hide();
if (bUpdateModel)
{