Kaydet (Commit) 552f754a authored tarafından Katarina Behrens's avatar Katarina Behrens

tdf#87356: Enable switching between gradient and solid fill data bar

Could use a checkbox instead of listbox here, since our LB has only
2 values, but with listbox it'll be easier to add more fill types in
the future

Change-Id: I67cd94b9b49b06434e4a22788b032425c3728e7f
üst dbe269df
...@@ -70,6 +70,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar ...@@ -70,6 +70,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
get( mpBtnCancel, "cancel" ); get( mpBtnCancel, "cancel" );
get( mpLbPos, "positive_colour" ); get( mpLbPos, "positive_colour" );
get( mpLbNeg, "negative_colour" ); get( mpLbNeg, "negative_colour" );
get( mpLbFillType, "fill_type" );
get( mpLbTypeMin, "min" ); get( mpLbTypeMin, "min" );
get( mpLbTypeMax, "max" ); get( mpLbTypeMax, "max" );
get( mpLbAxisPos, "axis_pos" ); get( mpLbAxisPos, "axis_pos" );
...@@ -82,6 +83,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar ...@@ -82,6 +83,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
Init(); Init();
mpLbPos->SelectEntry( rData.maPositiveColor ); mpLbPos->SelectEntry( rData.maPositiveColor );
mpLbFillType->SelectEntryPos( rData.mbGradient ? 1 : 0 );
if(rData.mpNegativeColor) if(rData.mpNegativeColor)
mpLbNeg->SelectEntry( *rData.mpNegativeColor ); mpLbNeg->SelectEntry( *rData.mpNegativeColor );
...@@ -176,7 +178,7 @@ ScDataBarFormatData* ScDataBarSettingsDlg::GetData() ...@@ -176,7 +178,7 @@ ScDataBarFormatData* ScDataBarSettingsDlg::GetData()
ScDataBarFormatData* pData = new ScDataBarFormatData(); ScDataBarFormatData* pData = new ScDataBarFormatData();
pData->maPositiveColor = mpLbPos->GetSelectEntryColor(); pData->maPositiveColor = mpLbPos->GetSelectEntryColor();
pData->mpNegativeColor.reset(new Color(mpLbNeg->GetSelectEntryColor())); pData->mpNegativeColor.reset(new Color(mpLbNeg->GetSelectEntryColor()));
pData->mbGradient = true; //FIXME pData->mbGradient = ( mpLbFillType->GetSelectEntryPos() == 1 );
pData->mpUpperLimit.reset(new ScColorScaleEntry()); pData->mpUpperLimit.reset(new ScColorScaleEntry());
pData->mpLowerLimit.reset(new ScColorScaleEntry()); pData->mpLowerLimit.reset(new ScColorScaleEntry());
pData->maAxisColor = mpLbAxisCol->GetSelectEntryColor(); pData->maAxisColor = mpLbAxisCol->GetSelectEntryColor();
......
...@@ -32,6 +32,7 @@ private: ...@@ -32,6 +32,7 @@ private:
ListBox* mpLbTypeMin; ListBox* mpLbTypeMin;
ListBox* mpLbTypeMax; ListBox* mpLbTypeMax;
ListBox* mpLbFillType;
ListBox* mpLbAxisPos; ListBox* mpLbAxisPos;
Edit* mpEdMin; Edit* mpEdMin;
......
...@@ -281,6 +281,35 @@ ...@@ -281,6 +281,35 @@
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Fill:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="fill_type">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Color</item>
<item translatable="yes">Gradient</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
......
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