tdf#149713 sw para dialog: gray out labels of the new options

Labels of the new hyphenation options "Hyphenation zone" and
"Minimum word length in characters" were always black, instead
of gray, when Hyphenation is disabled.

Follow-up to commit 7a1d4b7d1d
"tdf#149420 sw offapi xmloff: add hyphenation zone" and
commit 29359fc15c
"tdf#149324 sw offapi xmloff: add option to not hyphenate short words".

Change-Id: Ic41c2fa0fa69385013b1e90568084956cc5d791d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136367
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
László Németh
2022-06-27 09:46:20 +02:00
parent 9c79626647
commit 75e2d31376
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -232,7 +232,9 @@ private:
std::unique_ptr<weld::SpinButton> m_xExtHyphenAfterBox;
std::unique_ptr<weld::Label> m_xMaxHyphenLabel;
std::unique_ptr<weld::SpinButton> m_xMaxHyphenEdit;
std::unique_ptr<weld::Label> m_xMinWordLabel;
std::unique_ptr<weld::SpinButton> m_xMinWordLength;
std::unique_ptr<weld::Label> m_xHyphenZoneLabel;
std::unique_ptr<SvxRelativeField> m_xHyphenZone;
// pagebreak
+8
View File
@@ -1614,7 +1614,9 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet )
m_xAfterText->set_sensitive(bEnable);
m_xMaxHyphenLabel->set_sensitive(bEnable);
m_xMaxHyphenEdit->set_sensitive(bEnable);
m_xMinWordLabel->set_sensitive(bEnable);
m_xMinWordLength->set_sensitive(bEnable);
m_xHyphenZoneLabel->set_sensitive(bEnable);
m_xHyphenZone->set_sensitive(bEnable);
switch (rSet->GetItemState(SID_ATTR_PARA_PAGENUM))
@@ -1931,7 +1933,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
, m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button("spinLineBegin"))
, m_xMaxHyphenLabel(m_xBuilder->weld_label("labelMaxNum"))
, m_xMaxHyphenEdit(m_xBuilder->weld_spin_button("spinMaxNum"))
, m_xMinWordLabel(m_xBuilder->weld_label("labelMinLen"))
, m_xMinWordLength(m_xBuilder->weld_spin_button("spinMinLen"))
, m_xHyphenZoneLabel(m_xBuilder->weld_label("labelHyphenZone"))
, m_xHyphenZone(new SvxRelativeField(m_xBuilder->weld_metric_spin_button("spinHyphenZone", FieldUnit::CM)))
//Page break
, m_xPageBreakBox(m_xBuilder->weld_check_button("checkInsert"))
@@ -2001,7 +2005,9 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
m_xExtHyphenAfterBox->set_sensitive(false);
m_xMaxHyphenLabel->set_sensitive(false);
m_xMaxHyphenEdit->set_sensitive(false);
m_xMinWordLabel->set_sensitive(false);
m_xMinWordLength->set_sensitive(false);
m_xHyphenZoneLabel->set_sensitive(false);
m_xHyphenZone->set_sensitive(false);
m_xPageNumBox->set_sensitive(false);
m_xPagenumEdit->set_sensitive(false);
@@ -2136,7 +2142,9 @@ void SvxExtParagraphTabPage::HyphenClickHdl()
m_xExtHyphenAfterBox->set_sensitive(bEnable);
m_xMaxHyphenLabel->set_sensitive(bEnable);
m_xMaxHyphenEdit->set_sensitive(bEnable);
m_xMinWordLabel->set_sensitive(bEnable);
m_xMinWordLength->set_sensitive(bEnable);
m_xHyphenZoneLabel->set_sensitive(bEnable);
m_xHyphenZone->set_sensitive(bEnable);
m_xHyphenBox->set_state(bEnable ? TRISTATE_TRUE : TRISTATE_FALSE);
}