summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas kainz <kainz.a@gmail.com>2020-04-21 15:02:42 +0200
committerandreas_kainz <kainz.a@gmail.com>2020-04-22 17:57:12 +0200
commit90e73c8cb949e2ef96e9a77b2208f53e5feab3ab (patch)
tree6e59a6405e315bbd50a8c85331e5dcc7aadf91cf
parenta0c37548e17807bb0e0402b04e87bcd677fe132f (diff)
tdf#130156 add alignment commands to the sidebar
Change-Id: I302acc25b65ef20a0338401e763d400076f6e36d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92634 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx8
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx5
-rw-r--r--svx/uiconfig/ui/sidebarpossize.ui227
3 files changed, 189 insertions, 51 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 24e7b8b205b2..0ca21527d89e 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -76,6 +76,10 @@ PosSizePropertyPanel::PosSizePropertyPanel(
mxArrangeDispatch(new ToolbarUnoDispatcher(*mxArrangeTbx, *m_xBuilder, rxFrame)),
mxArrangeTbx2(m_xBuilder->weld_toolbar("arrangetoolbar2")),
mxArrangeDispatch2(new ToolbarUnoDispatcher(*mxArrangeTbx2, *m_xBuilder, rxFrame)),
+ mxAlignTbx(m_xBuilder->weld_toolbar("aligntoolbar")),
+ mxAlignDispatch(new ToolbarUnoDispatcher(*mxAlignTbx, *m_xBuilder, rxFrame)),
+ mxAlignTbx2(m_xBuilder->weld_toolbar("aligntoolbar2")),
+ mxAlignDispatch2(new ToolbarUnoDispatcher(*mxAlignTbx2, *m_xBuilder, rxFrame)),
mxBtnEditChart(m_xBuilder->weld_button("btnEditChart")),
maRect(),
mpView(nullptr),
@@ -138,6 +142,10 @@ void PosSizePropertyPanel::dispose()
mxFtFlip.reset();
mxFlipDispatch.reset();
mxFlipTbx.reset();
+ mxAlignDispatch.reset();
+ mxAlignDispatch2.reset();
+ mxAlignTbx.reset();
+ mxAlignTbx2.reset();
mxArrangeDispatch.reset();
mxArrangeDispatch2.reset();
mxArrangeTbx.reset();
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 2c78dd033253..bf5f1ff7e8ae 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -112,6 +112,11 @@ private:
std::unique_ptr<weld::Toolbar> mxArrangeTbx2;
std::unique_ptr<ToolbarUnoDispatcher> mxArrangeDispatch2;
+ std::unique_ptr<weld::Toolbar> mxAlignTbx;
+ std::unique_ptr<ToolbarUnoDispatcher> mxAlignDispatch;
+ std::unique_ptr<weld::Toolbar> mxAlignTbx2;
+ std::unique_ptr<ToolbarUnoDispatcher> mxAlignDispatch2;
+
//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 7b599ade42f3..a630d6fc0c6b 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -2,6 +2,32 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="svx">
<requires lib="gtk+" version="3.18"/>
+ <object class="GtkAdjustment" id="adjustmentPOS">
+ <property name="lower">-120</property>
+ <property name="upper">240</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustmentPOS1">
+ <property name="lower">-120</property>
+ <property name="upper">240</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustmentSIZE">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustmentSIZE1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustmentSpinDegrees">
+ <property name="upper">359</property>
+ <property name="step_increment">5</property>
+ </object>
<object class="GtkGrid" id="PosSizePropertyPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -162,31 +188,6 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">end</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkButton" id="btnEditChart">
- <property name="label" translatable="yes" context="sidebarpossize|btnEditChart">Edit Chart</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </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">1</property>
- <property name="top_attach">7</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="arrangelabel">
@@ -453,6 +454,156 @@
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">end</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkButton" id="btnEditChart">
+ <property name="label" translatable="yes" context="sidebarpossize|btnEditChart">Edit Chart</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </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">1</property>
+ <property name="top_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="alignlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarpossize|alignlabel">Alig_n:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">aligntoolbar</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="aligntoolbar">
+ <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:ObjectAlignLeft">
+ <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:AlignCenter">
+ <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:ObjectAlignRight">
+ <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">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="aligntoolbar2">
+ <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:AlignUp">
+ <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:AlignMiddle">
+ <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:AlignDown">
+ <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">1</property>
+ <property name="top_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -460,30 +611,4 @@
</packing>
</child>
</object>
- <object class="GtkAdjustment" id="adjustmentPOS">
- <property name="lower">-120</property>
- <property name="upper">240</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustmentPOS1">
- <property name="lower">-120</property>
- <property name="upper">240</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustmentSIZE">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustmentSIZE1">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustmentSpinDegrees">
- <property name="upper">359</property>
- <property name="step_increment">5</property>
- </object>
</interface>