diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-11-04 17:47:01 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-04 20:26:21 +0100 |
commit | 3df910376d403f582702bcc44eb4379fdab3c965 (patch) | |
tree | 29b4e8b1ec3fa61738b0c8a5aa7364149aa9b54c /svx | |
parent | e7e2a25bcaacf8dc02268dd436f761550d42b843 (diff) |
line spacing: Enable/disable also the value's label, looks more natural.
Change-Id: Ifc0e26008b5b5a5bcc8343ee37b87cda3fdb6114
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 9 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx | 1 | ||||
-rw-r--r-- | svx/uiconfig/ui/paralinespacingcontrol.ui | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 4f92378e737f..516688ab9b14 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -62,6 +62,8 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId) mpSpacing2Button = get<PushButton>("spacing_2"); mpLineDist = get<ListBox>("line_dist"); + + mpLineDistLabel = get<FixedText>("value_label"); mpLineDistAtPercentBox = get<MetricField>("percent_box"); mpLineDistAtMetricBox = get<MetricField>("metric_box"); @@ -171,12 +173,14 @@ void ParaLineSpacingControl::initialize() else if( eState == SfxItemState::DISABLED ) { mpLineDist->Disable(); + mpLineDistLabel->Disable(); mpActLineDistFld->Disable(); mpActLineDistFld->SetText(""); } else { + mpLineDistLabel->Disable(); mpActLineDistFld->Disable(); mpActLineDistFld->SetText(""); mpLineDist->SetNoSelection(); @@ -230,6 +234,7 @@ void ParaLineSpacingControl::UpdateMetricFields() else mpLineDistAtPercentBox->Hide(); + mpLineDistLabel->Disable(); mpActLineDistFld->Show(); mpActLineDistFld->Disable(); mpActLineDistFld->SetText(""); @@ -244,6 +249,7 @@ void ParaLineSpacingControl::UpdateMetricFields() if (mpLineDistAtMetricBox->GetText().isEmpty()) mpLineDistAtMetricBox->SetValue(mpLineDistAtMetricBox->Normalize(0)); + mpLineDistLabel->Enable(); mpActLineDistFld->Show(); mpActLineDistFld->Enable(); break; @@ -257,6 +263,7 @@ void ParaLineSpacingControl::UpdateMetricFields() if (mpLineDistAtMetricBox->GetText().isEmpty()) mpLineDistAtMetricBox->SetValue(mpLineDistAtMetricBox->Normalize(0), FUNIT_TWIP); + mpLineDistLabel->Enable(); mpActLineDistFld->Show(); mpActLineDistFld->Enable(); break; @@ -269,6 +276,7 @@ void ParaLineSpacingControl::UpdateMetricFields() if (mpLineDistAtPercentBox->GetText().isEmpty()) mpLineDistAtPercentBox->SetValue(mpLineDistAtPercentBox->Normalize(100), FUNIT_TWIP); + mpLineDistLabel->Enable(); mpActLineDistFld->Show(); mpActLineDistFld->Enable(); break; @@ -283,6 +291,7 @@ void ParaLineSpacingControl::UpdateMetricFields() if (mpLineDistAtMetricBox->GetValue() != nTemp) SetMetricValue(*mpLineDistAtMetricBox, FIX_DIST_DEF, SFX_MAPUNIT_TWIP); + mpLineDistLabel->Enable(); mpActLineDistFld->Show(); mpActLineDistFld->Enable(); } diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx index 0995380a2441..087e6a81936a 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx @@ -58,6 +58,7 @@ private: ListBox* mpLineDist; + FixedText* mpLineDistLabel; MetricField* mpLineDistAtPercentBox; MetricField* mpLineDistAtMetricBox; diff --git a/svx/uiconfig/ui/paralinespacingcontrol.ui b/svx/uiconfig/ui/paralinespacingcontrol.ui index 455a709e242a..2fb95d7f99a3 100644 --- a/svx/uiconfig/ui/paralinespacingcontrol.ui +++ b/svx/uiconfig/ui/paralinespacingcontrol.ui @@ -195,7 +195,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label4"> + <object class="GtkLabel" id="value_label"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> |