summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRishabh Kumar <kris.kr296@gmail.com>2015-08-23 00:34:17 +0530
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-08-26 14:14:15 +0000
commit489582458a03aaf25ddc83ae5e4416bbe236991d (patch)
tree734b00be3285f44efc35e63cb2b96815046435be
parentbe95c7430d2fd9858f41ee8e8882d987a5bbe749 (diff)
tdf#90078: Improve the Area section of the properties tab
Addition of new controls to gradient mode and area tab reorganisation Change-Id: I5c122705c41e14cddc2eaaac2561c02df22574f2 Reviewed-on: https://gerrit.libreoffice.org/16965 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--include/svx/sidebar/AreaPropertyPanelBase.hxx13
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx223
-rw-r--r--svx/uiconfig/ui/sidebararea.ui231
3 files changed, 344 insertions, 123 deletions
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 24ebcedc07ba..c12842f7708b 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -23,6 +23,7 @@
#include <vcl/ctrl.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/SidebarController.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include <svx/xgrad.hxx>
#include <svx/itemwin.hxx>
@@ -35,6 +36,7 @@
#include <svx/sidebar/PanelLayout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
+#include <vcl/slider.hxx>
#include <vcl/fixed.hxx>
#include <vcl/vclptr.hxx>
#include <svl/intitem.hxx>
@@ -125,11 +127,16 @@ protected:
VclPtr<FixedText> mpColorTextFT;
VclPtr<SvxFillTypeBox> mpLbFillType;
VclPtr<SvxFillAttrBox> mpLbFillAttr;
- VclPtr<sfx2::sidebar::SidebarToolBox> mpToolBoxColor; // for new color picker
+ VclPtr<ColorLB> mpLbFillGradFrom;
+ VclPtr<ColorLB> mpLbFillGradTo;
+ VclPtr<sfx2::sidebar::SidebarToolBox> mpToolBoxColor; // for new color picker
VclPtr<FixedText> mpTrspTextFT;
VclPtr<ListBox> mpLBTransType;
VclPtr<MetricField> mpMTRTransparent;
+ VclPtr<Slider> mpSldTransparent;
VclPtr<ToolBox> mpBTNGradient;
+ VclPtr<MetricField> mpMTRAngle;
+ VclPtr<ListBox> mpGradientStyle;
::boost::scoped_ptr< XFillStyleItem > mpStyleItem;
::boost::scoped_ptr< XFillColorItem > mpColorItem;
@@ -151,10 +158,13 @@ protected:
css::uno::Reference<css::frame::XFrame> mxFrame;
+ sfx2::sidebar::SidebarController* mpSidebarController;
+
DECL_LINK(SelectFillTypeHdl, ListBox* );
DECL_LINK(SelectFillAttrHdl, ListBox* );
DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
DECL_LINK(ModifyTransparentHdl_Impl, void*);
+ DECL_LINK(ModifyTransSliderHdl, void*);
// for transparency gradient
VclPtr<PopupControl> CreateTransparencyGradientControl (PopupContainer* pParent);
@@ -163,6 +173,7 @@ protected:
void Initialize();
void Update();
void ImpUpdateTransparencies();
+ void SetTransparency(sal_uInt16 nVal);
};
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index e21502b65c78..46a057d3fc62 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -20,6 +20,7 @@
#include "AreaTransparencyGradientControl.hxx"
#include <sfx2/sidebar/ResourceDefinitions.hrc>
+#include <sfx2/sidebar/SidebarController.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
#include <svx/sidebar/AreaPropertyPanelBase.hxx>
#include <AreaPropertyPanel.hrc>
@@ -84,7 +85,8 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
maTrGrPopup(this, ::boost::bind(&AreaPropertyPanelBase::CreateTransparencyGradientControl, this, _1)),
mpFloatTransparenceItem(),
mpTransparanceItem(),
- mxFrame(rxFrame)
+ mxFrame(rxFrame),
+ mpSidebarController()
{
get(mpColorTextFT, "filllabel");
get(mpLbFillType, "fillstyle");
@@ -93,7 +95,12 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
get(mpToolBoxColor, "selectcolor");
get(mpLBTransType, "transtype");
get(mpMTRTransparent, "settransparency");
+ get(mpSldTransparent, "transparencyslider");
get(mpBTNGradient, "selectgradient");
+ get(mpMTRAngle, "gradangle");
+ get(mpLbFillGradFrom, "fillgrad1");
+ get(mpLbFillGradTo, "fillgrad2");
+ get(mpGradientStyle, "gradientstyle");
Initialize();
}
@@ -112,7 +119,12 @@ void AreaPropertyPanelBase::dispose()
mpTrspTextFT.clear();
mpLBTransType.clear();
mpMTRTransparent.clear();
+ mpSldTransparent.clear();
mpBTNGradient.clear();
+ mpMTRAngle.clear();
+ mpLbFillGradFrom.clear();
+ mpLbFillGradTo.clear();
+ mpGradientStyle.clear();
PanelLayout::dispose();
}
@@ -150,12 +162,17 @@ void AreaPropertyPanelBase::Initialize()
aLink = LINK( this, AreaPropertyPanelBase, SelectFillAttrHdl );
mpLbFillAttr->SetSelectHdl( aLink );
+ mpGradientStyle->SetSelectHdl( aLink );
+ mpMTRAngle->SetModifyHdl( aLink );
+ mpLbFillGradFrom->SetSelectHdl( aLink );
+ mpLbFillGradTo->SetSelectHdl( aLink );
mpLBTransType->SetSelectHdl(LINK(this, AreaPropertyPanelBase, ChangeTrgrTypeHdl_Impl));
mpLBTransType->SetAccessibleName(OUString( "Transparency")); //wj acc
- mpMTRTransparent->SetValue( 50 );
+ SetTransparency( 50 );
mpMTRTransparent->SetModifyHdl(LINK(this, AreaPropertyPanelBase, ModifyTransparentHdl_Impl));
+ mpSldTransparent->SetSlideHdl(LINK(this, AreaPropertyPanelBase, ModifyTransSliderHdl));
mpMTRTransparent->SetAccessibleName(OUString( "Transparency")); //wj acc
const sal_uInt16 nIdGradient = mpBTNGradient->GetItemId(UNO_SIDEBARGRADIENT);
@@ -172,6 +189,14 @@ void AreaPropertyPanelBase::Initialize()
mpLBTransType->SetAccessibleRelationLabeledBy(mpTrspTextFT);
mpMTRTransparent->SetAccessibleRelationLabeledBy(mpMTRTransparent);
mpBTNGradient->SetAccessibleRelationLabeledBy(mpBTNGradient);
+
+ mpSidebarController = sfx2::sidebar::SidebarController::GetSidebarControllerForFrame(mxFrame);
+}
+
+void AreaPropertyPanelBase::SetTransparency(sal_uInt16 nVal)
+{
+ mpSldTransparent->SetThumbPos(nVal);
+ mpMTRTransparent->SetValue(nVal);
}
IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
@@ -194,6 +219,10 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
case drawing::FillStyle_NONE:
{
mpLbFillAttr->Show();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpGradientStyle->Hide();
+ mpMTRAngle->Hide();
mpToolBoxColor->Hide();
mpLbFillType->Selected();
mpLbFillAttr->Disable();
@@ -205,6 +234,10 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
case drawing::FillStyle_SOLID:
{
mpLbFillAttr->Hide();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpGradientStyle->Hide();
+ mpMTRAngle->Hide();
mpToolBoxColor->Show();
const OUString aTmpStr;
const Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO;
@@ -216,20 +249,29 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
}
case drawing::FillStyle_GRADIENT:
{
- mpLbFillAttr->Show();
+ mpLbFillAttr->Hide();
+ mpLbFillGradFrom->Show();
+ mpLbFillGradTo->Show();
+ mpGradientStyle->Show();
+ mpMTRAngle->Show();
mpToolBoxColor->Hide();
- if(pSh && pSh->GetItem(SID_GRADIENT_LIST))
+ if(pSh && pSh->GetItem(SID_COLOR_TABLE))
{
- if(!mpLbFillAttr->GetEntryCount())
- {
- const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
- mpLbFillAttr->Enable();
- mpLbFillAttr->Clear();
- mpLbFillAttr->Fill(aItem.GetGradientList());
- }
+ const SvxColorListItem aColorListItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE)));
+ mpLbFillAttr->Enable();
+ mpLbFillGradTo->Enable();
+ mpLbFillGradFrom->Enable();
+ mpGradientStyle->Enable();
+ mpMTRAngle->Enable();
+ mpLbFillAttr->Clear();
+ mpLbFillGradTo->Clear();
+ mpLbFillGradFrom->Clear();
+ mpLbFillGradTo->Fill(aColorListItem.GetColorList());
+ mpLbFillGradFrom->Fill(aColorListItem.GetColorList());
- mpLbFillAttr->AdaptDropDownLineCountToMaximum();
+ mpLbFillGradFrom->AdaptDropDownLineCountToMaximum();
+ mpLbFillGradTo->AdaptDropDownLineCountToMaximum();
if(LISTBOX_ENTRY_NOTFOUND != mnLastPosGradient)
{
@@ -238,23 +280,46 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
if(mnLastPosGradient < aItem.GetGradientList()->Count())
{
const XGradient aGradient = aItem.GetGradientList()->GetGradient(mnLastPosGradient)->GetGradient();
- const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient);
+ const XFillGradientItem aXFillGradientItem(aGradient);
// #i122676# change FillStyle and Gradient in one call
setFillStyleAndGradient(&aXFillStyleItem, aXFillGradientItem);
- mpLbFillAttr->SelectEntryPos(mnLastPosGradient);
+ mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor());
+ if(mpLbFillGradFrom->GetSelectEntryCount() == 0)
+ {
+ mpLbFillGradFrom->InsertEntry(aGradient.GetStartColor(), OUString());
+ mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor());
+ }
+ mpLbFillGradTo->SelectEntry(aGradient.GetEndColor());
+ if(mpLbFillGradTo->GetSelectEntryCount() == 0)
+ {
+ mpLbFillGradTo->InsertEntry(aGradient.GetEndColor(), OUString());
+ mpLbFillGradTo->SelectEntry(aGradient.GetEndColor());
+ }
+
+ mpMTRAngle->SetValue(aGradient.GetAngle() / 10);
+ css::awt::GradientStyle eXGS = aGradient.GetGradientStyle();
+ mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( eXGS ));
+
}
}
}
else
{
- mpLbFillAttr->Disable();
+ mpLbFillGradFrom->Disable();
+ mpLbFillGradTo->Disable();
+ mpMTRAngle->Disable();
+ mpGradientStyle->Disable();
}
break;
}
case drawing::FillStyle_HATCH:
{
mpLbFillAttr->Show();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
mpToolBoxColor->Hide();
if(pSh && pSh->GetItem(SID_HATCH_LIST))
@@ -293,6 +358,10 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
case drawing::FillStyle_BITMAP:
{
mpLbFillAttr->Show();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
mpToolBoxColor->Hide();
if(pSh && pSh->GetItem(SID_BITMAP_LIST))
@@ -341,6 +410,8 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox *, pToolBox)
}
}
+ mpSidebarController->NotifyResize();
+
return 0;
}
@@ -369,31 +440,21 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillAttrHdl, ListBox*, pToolBox)
}
case drawing::FillStyle_GRADIENT:
{
- sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos();
- if(LISTBOX_ENTRY_NOTFOUND == nPos)
+ if(pSh && pSh->GetItem(SID_COLOR_TABLE))
{
- nPos = mnLastPosGradient;
- }
+ XGradient aGradient;
+ aGradient.SetAngle(mpMTRAngle->GetValue() * 10);
+ aGradient.SetGradientStyle((css::awt::GradientStyle)mpGradientStyle->GetSelectEntryPos());
+ aGradient.SetStartColor(mpLbFillGradFrom->GetSelectEntryColor());
+ aGradient.SetEndColor(mpLbFillGradTo->GetSelectEntryColor());
- if(LISTBOX_ENTRY_NOTFOUND != nPos && pSh && pSh->GetItem(SID_GRADIENT_LIST))
- {
- const SvxGradientListItem aItem(*static_cast<const SvxGradientListItem*>(pSh->GetItem(SID_GRADIENT_LIST)));
-
- if(nPos < aItem.GetGradientList()->Count())
- {
- const XGradient aGradient = aItem.GetGradientList()->GetGradient(nPos)->GetGradient();
- const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient);
+ const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient);
// #i122676# Change FillStyle and Gradinet in one call
- setFillStyleAndGradient(bFillStyleChange ? &aXFillStyleItem : NULL, aXFillGradientItem);
- }
+ setFillStyleAndGradient(bFillStyleChange ? &aXFillStyleItem : NULL, aXFillGradientItem);
}
- if(LISTBOX_ENTRY_NOTFOUND != nPos)
- {
- mnLastPosGradient = nPos;
- }
break;
}
case drawing::FillStyle_HATCH:
@@ -456,6 +517,7 @@ IMPL_LINK(AreaPropertyPanelBase, SelectFillAttrHdl, ListBox*, pToolBox)
}
default: break;
}
+ mpSidebarController->NotifyResize();
}
return 0;
@@ -492,8 +554,10 @@ void AreaPropertyPanelBase::ImpUpdateTransparencies()
mpLBTransType->SelectEntryPos(1);
mpBTNGradient->Hide();
mpMTRTransparent->Show();
+ mpSldTransparent->Show();
mpMTRTransparent->Enable();
- mpMTRTransparent->SetValue(nValue);
+ mpSldTransparent->Enable();
+ SetTransparency(nValue);
}
if(!bZeroValue)
@@ -513,6 +577,7 @@ void AreaPropertyPanelBase::ImpUpdateTransparencies()
mpLBTransType->Enable();
mpTrspTextFT->Enable();
mpMTRTransparent->Hide();
+ mpSldTransparent->Hide();
mpBTNGradient->Enable();
mpBTNGradient->Show();
@@ -575,8 +640,10 @@ void AreaPropertyPanelBase::ImpUpdateTransparencies()
mpLBTransType->SelectEntryPos(0);
mpBTNGradient->Hide();
mpMTRTransparent->Enable();
+ mpSldTransparent->Enable();
mpMTRTransparent->Show();
- mpMTRTransparent->SetValue(0);
+ mpSldTransparent->Show();
+ SetTransparency(0);
}
}
else
@@ -586,7 +653,9 @@ void AreaPropertyPanelBase::ImpUpdateTransparencies()
mpLBTransType->Disable();
mpTrspTextFT->Disable();
mpMTRTransparent->Disable();
+ mpSldTransparent->Disable();
mpMTRTransparent->Show();
+ mpSldTransparent->Show();
mpBTNGradient->Disable();
mpBTNGradient->Hide();
}
@@ -698,22 +767,30 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefault, co
if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue())
{
- mpLbFillAttr->Show();
+ mpLbFillAttr->Hide();
+ mpLbFillGradFrom->Show();
+ mpLbFillGradTo->Show();
+ mpMTRAngle->Show();
+ mpGradientStyle->Show();
mpToolBoxColor->Hide();
if(bDefault)
{
- mpLbFillAttr->Enable();
Update();
}
else if(bDisabled)
{
- mpLbFillAttr->Disable();
- mpLbFillAttr->SetNoSelection();
+ mpLbFillGradFrom->SetNoSelection();
+ mpLbFillGradTo->SetNoSelection();
+ mpLbFillGradFrom->Disable();
+ mpLbFillGradTo->Disable();
+ mpMTRAngle->Disable();
+ mpGradientStyle->Disable();
}
else
{
- mpLbFillAttr->SetNoSelection();
+ mpLbFillGradFrom->SetNoSelection();
+ mpLbFillGradTo->SetNoSelection();
}
}
}
@@ -908,6 +985,7 @@ void AreaPropertyPanelBase::NotifyItemUpdate(
break;
}
}
+ mpSidebarController->NotifyResize();
}
void AreaPropertyPanelBase::Update()
@@ -922,6 +1000,10 @@ void AreaPropertyPanelBase::Update()
case drawing::FillStyle_NONE:
{
mpLbFillAttr->Show();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
mpToolBoxColor->Hide();
break;
}
@@ -930,13 +1012,22 @@ void AreaPropertyPanelBase::Update()
if(mpColorItem)
{
mpLbFillAttr->Hide();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
mpToolBoxColor->Show();
}
break;
}
case drawing::FillStyle_GRADIENT:
{
- mpLbFillAttr->Show();
+ mpLbFillAttr->Hide();
+ mpLbFillGradFrom->Show();
+ mpLbFillGradTo->Show();
+ mpMTRAngle->Enable();
+ mpMTRAngle->Show();
+ mpGradientStyle->Show();
mpToolBoxColor->Hide();
if(pSh && pSh->GetItem(SID_GRADIENT_LIST))
@@ -945,12 +1036,33 @@ void AreaPropertyPanelBase::Update()
mpLbFillAttr->Enable();
mpLbFillAttr->Clear();
mpLbFillAttr->Fill(aItem.GetGradientList());
-
+ const SvxColorListItem aColorItem(*static_cast<const SvxColorListItem*>(pSh->GetItem(SID_COLOR_TABLE)));
+ mpLbFillGradFrom->Fill(aColorItem.GetColorList());
+ mpLbFillGradTo->Fill(aColorItem.GetColorList());
+ mpLbFillGradTo->SetNoSelection();
+ mpLbFillGradFrom->SetNoSelection();
if(mpFillGradientItem)
{
const OUString aString(mpFillGradientItem->GetName());
-
mpLbFillAttr->SelectEntry(aString);
+ const XGradient pGradient = mpFillGradientItem->GetGradientValue();
+ mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor());
+ if(mpLbFillGradFrom->GetSelectEntryCount() == 0)
+ {
+ mpLbFillGradFrom->InsertEntry(pGradient.GetStartColor(), OUString());
+ mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor());
+ }
+ mpLbFillGradTo->SelectEntry(pGradient.GetEndColor());
+ if(mpLbFillGradTo->GetSelectEntryCount() == 0)
+ {
+ mpLbFillGradTo->InsertEntry(pGradient.GetEndColor(), OUString());
+ mpLbFillGradTo->SelectEntry(pGradient.GetEndColor());
+ }
+ mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( pGradient.GetGradientStyle() ));
+ if(mpGradientStyle->GetSelectEntryPos() == GradientStyle_RADIAL)
+ mpMTRAngle->Disable();
+ else
+ mpMTRAngle->SetValue( pGradient.GetAngle() /10 );
}
else
{
@@ -966,6 +1078,10 @@ void AreaPropertyPanelBase::Update()
case drawing::FillStyle_HATCH:
{
mpLbFillAttr->Show();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
mpToolBoxColor->Hide();
if(pSh && pSh->GetItem(SID_HATCH_LIST))
@@ -996,6 +1112,10 @@ void AreaPropertyPanelBase::Update()
{
mpLbFillAttr->Show();
mpToolBoxColor->Hide();
+ mpLbFillGradFrom->Hide();
+ mpLbFillGradTo->Hide();
+ mpMTRAngle->Hide();
+ mpGradientStyle->Hide();
if(pSh && pSh->GetItem(SID_BITMAP_LIST))
{
@@ -1028,6 +1148,16 @@ void AreaPropertyPanelBase::Update()
}
}
+IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl)
+{
+ const sal_uInt16 nVal = mpSldTransparent->GetThumbPos();
+ SetTransparency(nVal);
+ const XFillTransparenceItem aLinearItem(nVal);
+ setFillTransparence(aLinearItem);
+
+ return 0L;
+}
+
IMPL_LINK_TYPED( AreaPropertyPanelBase, ClickTrGrHdl_Impl, ToolBox*, pToolBox, void )
{
maTrGrPopup.Rearrange(mpFloatTransparenceItem.get());
@@ -1045,17 +1175,21 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ChangeTrgrTypeHdl_Impl)
{
mpBTNGradient->Hide();
mpMTRTransparent->Show();
+ mpSldTransparent->Show();
mpMTRTransparent->Enable();
- mpMTRTransparent->SetValue(0);
+ mpSldTransparent->Enable();
+ SetTransparency(0);
}
else if(1 == nSelectType)
{
mpBTNGradient->Hide();
mpMTRTransparent->Show();
+ mpSldTransparent->Show();
nTrans = mnLastTransSolid;
mpMTRTransparent->SetValue(nTrans);
mpLBTransType->SelectEntryPos(1);
mpMTRTransparent->Enable();
+ mpSldTransparent->Enable();
}
else
{
@@ -1085,6 +1219,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ChangeTrgrTypeHdl_Impl)
}
mpMTRTransparent->Hide();
+ mpSldTransparent->Hide();
mpBTNGradient->Enable();
bGradient = true;
}
diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui
index 708533c726a6..5321824dde9e 100644
--- a/svx/uiconfig/ui/sidebararea.ui
+++ b/svx/uiconfig/ui/sidebararea.ui
@@ -4,11 +4,15 @@
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
- <property name="lower">0</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">360</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkGrid" id="AreaPropertyPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -38,7 +42,6 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Fill:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">fillstyle</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -46,21 +49,6 @@
</packing>
</child>
<child>
- <object class="svxlo-SvxFillTypeBox" id="fillstyle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Select the fill type to apply.</property>
- <property name="tooltip_text" translatable="yes">Select the fill type to apply.</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -99,11 +87,25 @@
<property name="tooltip_text" translatable="yes">Select the effect to apply.</property>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="svxlo-ColorLB" id="fillgrad1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Fill gradient from.</property>
+ <property name="tooltip_text" translatable="yes">Fill gradient from.</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
@@ -111,20 +113,45 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="transparencylabel">
+ <object class="svxlo-SvxFillTypeBox" id="fillstyle">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Transparency</property>
- <property name="tooltip_text" translatable="yes">Transparency</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Transparency:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">transtype</property>
+ <property name="tooltip_markup" translatable="yes">Select the fill type to apply.</property>
+ <property name="tooltip_text" translatable="yes">Select the fill type to apply.</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="selectgradient">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <child>
+ <object class="GtkMenuToolButton" id="gradient">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Specify the variation of gradient transparency.</property>
+ <property name="tooltip_text" translatable="yes">Specify the variation of gradient transparency.</property>
+ <property name="hexpand">True</property>
+ <property name="action_name">.uno:sidebargradient</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -146,70 +173,71 @@
</items>
</object>
<packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="transparencylabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Transparency</property>
+ <property name="tooltip_text" translatable="yes">Transparency</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Transparency:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box9">
+ <object class="svxlo-ColorLB" id="fillgrad2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkToolbar" id="selectgradient">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuToolButton" id="gradient">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Specify the variation of gradient transparency.</property>
- <property name="tooltip_text" translatable="yes">Specify the variation of gradient transparency.</property>
- <property name="action_name">.uno:sidebargradient</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="settransparency:0%">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
- <property name="tooltip_text" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
- <property name="hexpand">True</property>
- <property name="max_length">100</property>
- <property name="invisible_char">•</property>
- <property name="adjustment">adjustment1</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="climb_rate">5</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Fill gradient to.</property>
+ <property name="tooltip_text" translatable="yes">Fill gradient to.</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkSpinButton" id="gradangle:0degrees">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment2</property>
+ <property name="tooltip_markup" translatable="yes">Select the gradient angle.</property>
+ <property name="tooltip_text" translatable="yes">Select the gradient angle.</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="gradientstyle">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Linear</item>
+ <item translatable="yes">Axial</item>
+ <item translatable="yes">Radial</item>
+ <item translatable="yes">Ellipsoid</item>
+ <item translatable="yes">Quadratic</item>
+ <item translatable="yes">Square</item>
+ </items>
+ <property name="tooltip_markup" translatable="yes">Select the gradient style.</property>
+ <property name="tooltip_text" translatable="yes">Select the gradient style.</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
</child>
<child>
<placeholder/>
@@ -221,6 +249,53 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkScale" id="transparencyslider">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="round_digits">1</property>
+ <property name="draw_value">False</property>
+ <property name="tooltip_markup" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ <property name="tooltip_text" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="settransparency:0%">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_markup" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ <property name="tooltip_text" translatable="yes">Specify 0% for fully opaque through 100% for fully transparent.</property>
+ <property name="max_length">100</property>
+ <property name="invisible_char">•</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="climb_rate">5</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>