Kaydet (Commit) 00edc956 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Markus Mohrhard

Some (mostly HIG) tweaks to chart axis panel

+ added a text orientation spinbox to .ui file, but it does nothing so
far

Change-Id: Idb9177683c46fba50a153aff795aab7a2f419694
Reviewed-on: https://gerrit.libreoffice.org/17402Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 41d1b01a
...@@ -197,6 +197,8 @@ ChartAxisPanel::ChartAxisPanel( ...@@ -197,6 +197,8 @@ ChartAxisPanel::ChartAxisPanel(
get(mpCBReverse, "checkbutton_reverse"); get(mpCBReverse, "checkbutton_reverse");
get(mpLBLabelPos, "comboboxtext_label_position"); get(mpLBLabelPos, "comboboxtext_label_position");
//FIXME: add text orientation spinbox + its handler
get(mpGridLabel, "label_props");
Initialize(); Initialize();
} }
...@@ -219,6 +221,7 @@ void ChartAxisPanel::dispose() ...@@ -219,6 +221,7 @@ void ChartAxisPanel::dispose()
mpCBReverse.clear(); mpCBReverse.clear();
mpLBLabelPos.clear(); mpLBLabelPos.clear();
mpGridLabel.clear();
PanelLayout::dispose(); PanelLayout::dispose();
} }
...@@ -322,7 +325,10 @@ IMPL_LINK(ChartAxisPanel, CheckBoxHdl, CheckBox*, pCheckbox) ...@@ -322,7 +325,10 @@ IMPL_LINK(ChartAxisPanel, CheckBoxHdl, CheckBox*, pCheckbox)
bool bChecked = pCheckbox->IsChecked(); bool bChecked = pCheckbox->IsChecked();
if (pCheckbox == mpCBShowLabel.get()) if (pCheckbox == mpCBShowLabel.get())
{
mpGridLabel->Enable(bChecked);
setLabelShown(mxModel, aCID, bChecked); setLabelShown(mxModel, aCID, bChecked);
}
else if (pCheckbox == mpCBReverse.get()) else if (pCheckbox == mpCBReverse.get())
setReverse(mxModel, aCID, bChecked); setReverse(mxModel, aCID, bChecked);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <sfx2/sidebar/IContextChangeReceiver.hxx> #include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <sfx2/sidebar/SidebarModelUpdate.hxx> #include <sfx2/sidebar/SidebarModelUpdate.hxx>
#include <svx/sidebar/PanelLayout.hxx> #include <svx/sidebar/PanelLayout.hxx>
#include <vcl/layout.hxx>
#include "ChartSidebarModifyListener.hxx" #include "ChartSidebarModifyListener.hxx"
#include "ChartSidebarSelectionListener.hxx" #include "ChartSidebarSelectionListener.hxx"
...@@ -79,6 +80,7 @@ private: ...@@ -79,6 +80,7 @@ private:
VclPtr<CheckBox> mpCBReverse; VclPtr<CheckBox> mpCBReverse;
VclPtr<ListBox> mpLBLabelPos; VclPtr<ListBox> mpLBLabelPos;
VclPtr<VclGrid> mpGridLabel;
css::uno::Reference<css::frame::XFrame> mxFrame; css::uno::Reference<css::frame::XFrame> mxFrame;
......
...@@ -5,13 +5,17 @@ ...@@ -5,13 +5,17 @@
<object class="GtkGrid" id="ChartAxisPanel"> <object class="GtkGrid" id="ChartAxisPanel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child> <child>
<object class="GtkGrid" id="grid1"> <object class="GtkGrid" id="grid1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child> <child>
<object class="GtkCheckButton" id="checkbutton_show_label"> <object class="GtkCheckButton" id="checkbutton_show_label">
<property name="label" translatable="yes">Show Labels</property> <property name="label" translatable="yes">Show labels</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
...@@ -38,49 +42,73 @@ ...@@ -38,49 +42,73 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="label1"> <object class="GtkGrid" id="label_props">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Label Position</property> <property name="margin_left">12</property>
<property name="row_spacing">6</property>
<property name="column_spacing">5</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Label position:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboboxtext_label_position</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="comboboxtext_label_position">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Near Axis</item>
<item translatable="yes">Near Axis (other side)</item>
<item translatable="yes">Outside start</item>
<item translatable="yes">Outside end</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="label" translatable="yes">_Text orientation:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">spinbutton1:0degrees</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinbutton1:0degrees">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text orientation</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="comboboxtext_label_position">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Near Axis</item>
<item translatable="yes">Near Axis (other side)</item>
<item translatable="yes">Outside start</item>
<item translatable="yes">Outside end</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment