[Libreoffice-commits] core.git: svx/source svx/uiconfig
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 7 10:18:00 UTC 2020
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 9 ++++
svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 2 +
svx/uiconfig/ui/sidebarpossize.ui | 37 ++++++++++++++++++++
3 files changed, 48 insertions(+)
New commits:
commit ed7a51ea8b319bc3c1dc03b7552817eeae3c1c75
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Fri Apr 3 03:33:31 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Apr 7 12:17:25 2020 +0200
use "To Background" and "To Foreground" only in writer sidebar
Change-Id: Ib7ccac192721b663c9655417fc3d639766d0424d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91604
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index ccdfc1ee3f8c..24e7b8b205b2 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -74,6 +74,8 @@ PosSizePropertyPanel::PosSizePropertyPanel(
mxFlipDispatch(new ToolbarUnoDispatcher(*mxFlipTbx, *m_xBuilder, rxFrame)),
mxArrangeTbx(m_xBuilder->weld_toolbar("arrangetoolbar")),
mxArrangeDispatch(new ToolbarUnoDispatcher(*mxArrangeTbx, *m_xBuilder, rxFrame)),
+ mxArrangeTbx2(m_xBuilder->weld_toolbar("arrangetoolbar2")),
+ mxArrangeDispatch2(new ToolbarUnoDispatcher(*mxArrangeTbx2, *m_xBuilder, rxFrame)),
mxBtnEditChart(m_xBuilder->weld_button("btnEditChart")),
maRect(),
mpView(nullptr),
@@ -137,7 +139,9 @@ void PosSizePropertyPanel::dispose()
mxFlipDispatch.reset();
mxFlipTbx.reset();
mxArrangeDispatch.reset();
+ mxArrangeDispatch2.reset();
mxArrangeTbx.reset();
+ mxArrangeTbx2.reset();
mxBtnEditChart.reset();
maTransfPosXControl.dispose();
@@ -268,12 +272,14 @@ void PosSizePropertyPanel::HandleContextChange(
bool bShowAngle = false;
bool bShowFlip = false;
bool bShowEditChart = false;
+ bool bShowArrangeTbx2 = false;
switch (maContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application::WriterVariants, Context::Draw):
bShowAngle = true;
bShowFlip = true;
+ bShowArrangeTbx2 = true;
break;
case CombinedEnumContext(Application::WriterVariants, Context::Graphic):
@@ -333,6 +339,9 @@ void PosSizePropertyPanel::HandleContextChange(
// Edit Chart
mxBtnEditChart->set_visible(bShowEditChart);
+ // Arrange tool bar 2
+ mxArrangeTbx2->set_visible(bShowArrangeTbx2);
+
if (mxSidebar.is())
mxSidebar->requestLayout();
}
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index eacd06f4672e..2c78dd033253 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -109,6 +109,8 @@ private:
std::unique_ptr<weld::Toolbar> mxArrangeTbx;
std::unique_ptr<ToolbarUnoDispatcher> mxArrangeDispatch;
+ std::unique_ptr<weld::Toolbar> mxArrangeTbx2;
+ std::unique_ptr<ToolbarUnoDispatcher> mxArrangeDispatch2;
//edit charts button for online's mobile view
std::unique_ptr<weld::Button> mxBtnEditChart;
diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui
index 86d5eaaa5a24..7b599ade42f3 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -262,6 +262,43 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkToolbar" id="arrangetoolbar2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes" context="sidebarpossize|arrangetoolbar">Arrange</property>
+ <property name="toolbar_style">icons</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">2</property>
+ <child>
+ <object class="GtkToolButton" id=".uno:SetObjectToBackground">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id=".uno:SetObjectToForeground">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
More information about the Libreoffice-commits
mailing list