From 4be80459e55f80816ecea2c7d8f24aea7660d0c9 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 16 Jul 2015 00:48:16 +0200 Subject: adapt to UX discussion Change-Id: I6a7ba1f13cddf20b2751f2ee113427db43978cfa --- .../controller/sidebar/ChartElementsPanel.cxx | 32 ++++-- .../controller/sidebar/ChartElementsPanel.hxx | 6 +- chart2/uiconfig/ui/sidebarelements.ui | 117 +++------------------ 3 files changed, 39 insertions(+), 116 deletions(-) diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 528bae3cb036..36afcc379e28 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -269,8 +269,10 @@ ChartElementsPanel::ChartElementsPanel( get(mpCB2ndYAxis, "checkbutton_2nd_y_axis"); get(mpCB2ndYAxisTitle, "checkbutton_2nd_y_axis_title"); get(mpCBLegend, "checkbutton_legend"); - get(mpCBGridVertical, "checkbutton_gridline_vertical"); - get(mpCBGridHorizontal, "checkbutton_gridline_horizontal"); + get(mpCBGridVerticalMajor, "checkbutton_gridline_vertical_major"); + get(mpCBGridHorizontalMajor, "checkbutton_gridline_horizontal_major"); + get(mpCBGridVerticalMinor, "checkbutton_gridline_vertical_minor"); + get(mpCBGridHorizontalMinor, "checkbutton_gridline_horizontal_minor"); Initialize(); } @@ -298,8 +300,10 @@ void ChartElementsPanel::dispose() mpCB2ndYAxis.clear(); mpCB2ndYAxisTitle.clear(); mpCBLegend.clear(); - mpCBGridVertical.clear(); - mpCBGridHorizontal.clear(); + mpCBGridVerticalMajor.clear(); + mpCBGridHorizontalMajor.clear(); + mpCBGridVerticalMinor.clear(); + mpCBGridHorizontalMinor.clear(); PanelLayout::dispose(); } @@ -324,8 +328,10 @@ void ChartElementsPanel::Initialize() mpCB2ndYAxis->SetClickHdl(aLink); mpCB2ndYAxisTitle->SetClickHdl(aLink); mpCBLegend->SetClickHdl(aLink); - mpCBGridVertical->SetClickHdl(aLink); - mpCBGridHorizontal->SetClickHdl(aLink); + mpCBGridVerticalMajor->SetClickHdl(aLink); + mpCBGridHorizontalMajor->SetClickHdl(aLink); + mpCBGridVerticalMinor->SetClickHdl(aLink); + mpCBGridHorizontalMinor->SetClickHdl(aLink); } void ChartElementsPanel::updateData() @@ -342,8 +348,10 @@ void ChartElementsPanel::updateData() mpCBZAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Z_AXIS_TITLE)); mpCB2ndXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::SECONDARY_X_AXIS_TITLE)); mpCB2ndYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::SECONDARY_Y_AXIS_TITLE)); - mpCBGridVertical->Check(isGridVisible(mxModel, GridType::VERT_MAJOR)); - mpCBGridHorizontal->Check(isGridVisible(mxModel, GridType::HOR_MAJOR)); + mpCBGridVerticalMajor->Check(isGridVisible(mxModel, GridType::VERT_MAJOR)); + mpCBGridHorizontalMajor->Check(isGridVisible(mxModel, GridType::HOR_MAJOR)); + mpCBGridVerticalMinor->Check(isGridVisible(mxModel, GridType::VERT_MINOR)); + mpCBGridHorizontalMinor->Check(isGridVisible(mxModel, GridType::HOR_MINOR)); mpCBXAxis->Check(isAxisVisible(mxModel, AxisType::X_MAIN)); mpCBYAxis->Check(isAxisVisible(mxModel, AxisType::Y_MAIN)); mpCBZAxis->Check(isAxisVisible(mxModel, AxisType::Z_MAIN)); @@ -434,10 +442,14 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, CheckBox*, pCheckBox) setTitleVisible(mxModel, TitleHelper::SECONDARY_Y_AXIS_TITLE, bChecked); else if (pCheckBox == mpCBLegend.get()) setLegendVisible(mxModel, bChecked); - else if (pCheckBox == mpCBGridVertical.get()) + else if (pCheckBox == mpCBGridVerticalMajor.get()) setGridVisible(mxModel, GridType::VERT_MAJOR, bChecked); - else if (pCheckBox == mpCBGridHorizontal.get()) + else if (pCheckBox == mpCBGridHorizontalMajor.get()) setGridVisible(mxModel, GridType::HOR_MAJOR, bChecked); + else if (pCheckBox == mpCBGridVerticalMinor.get()) + setGridVisible(mxModel, GridType::VERT_MINOR, bChecked); + else if (pCheckBox == mpCBGridHorizontalMinor.get()) + setGridVisible(mxModel, GridType::HOR_MINOR, bChecked); return 0; } diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx b/chart2/source/controller/sidebar/ChartElementsPanel.hxx index 316eb5dee253..4aee729818ee 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx @@ -85,8 +85,10 @@ private: VclPtr mpCB2ndYAxis; VclPtr mpCB2ndYAxisTitle; VclPtr mpCBLegend; - VclPtr mpCBGridVertical; - VclPtr mpCBGridHorizontal; + VclPtr mpCBGridVerticalMajor; + VclPtr mpCBGridHorizontalMajor; + VclPtr mpCBGridVerticalMinor; + VclPtr mpCBGridHorizontalMinor; css::uno::Reference mxFrame; ::sfx2::sidebar::EnumContext maContext; diff --git a/chart2/uiconfig/ui/sidebarelements.ui b/chart2/uiconfig/ui/sidebarelements.ui index 2432c6e22407..e22976ab15b4 100644 --- a/chart2/uiconfig/ui/sidebarelements.ui +++ b/chart2/uiconfig/ui/sidebarelements.ui @@ -333,8 +333,7 @@ True False - Gridlines - + Gridlines False @@ -347,8 +346,8 @@ True False - - Vertical + + Vertical Major True True False @@ -362,54 +361,14 @@ - - True - False - - major - - - - False - True - 1 - - - - - False - True - 12 - - - - - True - False - - - Horizontal + + Vertical minor True True False 0 - 0.56000000238418579 True - - False - True - 0 - - - - - True - False - - major - - False True @@ -420,32 +379,21 @@ False True - 13 - - - - - True - False - Data - - - False - True - 14 + 12 - + True False - - Show label + + Horizontal Major True True False 0 + 0.56000000238418579 True @@ -455,53 +403,14 @@ - - True - False - - above - - - - False - True - 1 - - - - - False - True - 15 - - - - - True - False - - - Trendline + + Horizontal major True True False 0 True - - False - True - 0 - - - - - True - False - - linear - - False True @@ -512,7 +421,7 @@ False True - 16 + 13 -- cgit