[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source sd/uiconfig
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 23 11:30:09 UTC 2020
sd/source/ui/sidebar/SlideBackground.cxx | 34 +++++++++++++---------
sd/source/ui/sidebar/SlideBackground.hxx | 3 +
sd/uiconfig/simpress/ui/sidebarslidebackground.ui | 14 +++++++++
3 files changed, 37 insertions(+), 14 deletions(-)
New commits:
commit 5c2958a0a49b493e23f75f2f96f96fd2ed327fc2
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Thu Apr 23 12:54:23 2020 +0530
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Apr 23 13:29:38 2020 +0200
Added separate color picker for slide background gradient
Change-Id: I27b60244f011cb482affa5f47cde170daf3fc309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92741
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index c644d38ec226..9182f6984056 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -148,7 +148,8 @@ SlideBackground::SlideBackground(
mpMasterSlide->set_width_request(0);
get(mpBackgroundLabel, "label3");
get(mpFillAttr, "fillattr1");
- get(mpFillGrad, "fillattr2");
+ get(mpFillGrad1, "fillattr2");
+ get(mpFillGrad2, "fillattr3");
get(mpFillStyle, "fillstyle");
get(mpFillLB, "fillattr");
get(mpInsertImage, "button2");
@@ -217,7 +218,8 @@ void SlideBackground::Initialize()
mpFillStyle->SetSelectHdl(LINK(this, SlideBackground, FillStyleModifyHdl));
mpFillLB->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl));
- mpFillGrad->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl));
+ mpFillGrad1->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl));
+ mpFillGrad2->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl));
mpFillAttr->SetSelectHdl(LINK(this, SlideBackground, FillBackgroundHdl));
ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
@@ -358,13 +360,15 @@ void SlideBackground::Update()
{
mpFillLB->Hide();
mpFillAttr->Hide();
- mpFillGrad->Hide();
+ mpFillGrad1->Hide();
+ mpFillGrad2->Hide();
}
break;
case SOLID:
{
mpFillAttr->Hide();
- mpFillGrad->Hide();
+ mpFillGrad1->Hide();
+ mpFillGrad2->Hide();
mpFillLB->Show();
const Color aColor = GetColorSetOrDefault();
mpFillLB->SelectEntry(aColor);
@@ -372,15 +376,16 @@ void SlideBackground::Update()
break;
case GRADIENT:
{
- mpFillLB->Show();
+ mpFillLB->Hide();
mpFillAttr->Hide();
- mpFillGrad->Show();
+ mpFillGrad1->Show();
+ mpFillGrad2->Show();
const XGradient xGradient = GetGradientSetOrDefault();
const Color aStartColor = xGradient.GetStartColor();
- mpFillLB->SelectEntry(aStartColor);
+ mpFillGrad1->SelectEntry(aStartColor);
const Color aEndColor = xGradient.GetEndColor();
- mpFillGrad->SelectEntry(aEndColor);
+ mpFillGrad2->SelectEntry(aEndColor);
}
break;
@@ -390,7 +395,8 @@ void SlideBackground::Update()
mpFillAttr->Show();
mpFillAttr->Clear();
mpFillAttr->Fill(pSh->GetItem(SID_HATCH_LIST)->GetHatchList());
- mpFillGrad->Hide();
+ mpFillGrad1->Hide();
+ mpFillGrad2->Hide();
const OUString aHatchName = GetHatchingSetOrDefault();
mpFillAttr->SelectEntry( aHatchName );
@@ -403,7 +409,8 @@ void SlideBackground::Update()
mpFillLB->Hide();
mpFillAttr->Show();
mpFillAttr->Clear();
- mpFillGrad->Hide();
+ mpFillGrad1->Hide();
+ mpFillGrad2->Hide();
OUString aName;
if(nPos == BITMAP)
{
@@ -653,7 +660,8 @@ void SlideBackground::dispose()
mpMasterSlide.clear();
mpBackgroundLabel.clear();
mpFillAttr.clear();
- mpFillGrad.clear();
+ mpFillGrad1.clear();
+ mpFillGrad2.clear();
mpFillStyle.clear();
mpFillLB.clear();
mpInsertImage.clear();
@@ -1058,8 +1066,8 @@ IMPL_LINK_NOARG(SlideBackground, FillColorHdl, SvxColorListBox&, void)
case drawing::FillStyle_GRADIENT:
{
XGradient aGradient;
- aGradient.SetStartColor(mpFillLB->GetSelectEntryColor());
- aGradient.SetEndColor(mpFillGrad->GetSelectEntryColor());
+ aGradient.SetStartColor(mpFillGrad1->GetSelectEntryColor());
+ aGradient.SetEndColor(mpFillGrad2->GetSelectEntryColor());
// the name doesn't really matter, it'll be converted to unique one eventually,
// but it has to be non-empty
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index 81e335b30580..dcdab6927ebb 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -95,7 +95,8 @@ private:
VclPtr<SvxFillTypeBox> mpFillStyle;
VclPtr<SvxColorListBox> mpFillLB;
VclPtr<SvxFillAttrBox> mpFillAttr;
- VclPtr<SvxColorListBox> mpFillGrad;
+ VclPtr<SvxColorListBox> mpFillGrad1;
+ VclPtr<SvxColorListBox> mpFillGrad2;
VclPtr<Button> mpInsertImage;
VclPtr<CheckBox> mpDspMasterBackground;
VclPtr<CheckBox> mpDspMasterObjects;
diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
index 256f06935ee4..2c4e4202a6e6 100644
--- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
+++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
@@ -155,6 +155,20 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
+ <property name="has_tooltip">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxcorelo-SvxColorListBox" id="fillattr3">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has_tooltip">True</property>
</object>
<packing>
<property name="left_attach">1</property>
More information about the Libreoffice-commits
mailing list