diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-03 16:24:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-10 20:51:10 +0200 |
commit | 265f95d9a316b1ecfee21a01d46d04cc6eadee7b (patch) | |
tree | d9db6bf969be3c688731ff4bf865ea66b0de0fe5 /vcl/source | |
parent | 7c38fa04c70401d84352e8ae7ca650dfcc74b3e0 (diff) |
support attempting to set a foreground color for labels and textviews
but try to discourage use of random colors
Change-Id: I1a67956846b8bd056180b37547ca7d206970c0e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102014
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 16436ad0a666..0343347cde96 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5547,6 +5547,14 @@ void SalInstanceLabel::set_label_type(weld::LabelType eType) } } +void SalInstanceLabel::set_font_color(const Color& rColor) +{ + if (rColor != COL_AUTO) + m_xLabel->SetControlForeground(rColor); + else + m_xLabel->SetControlForeground(); +} + void SalInstanceLabel::set_font(const vcl::Font& rFont) { m_xLabel->SetPointFont(*m_xLabel, rFont); @@ -5623,6 +5631,14 @@ void SalInstanceTextView::set_monospace(bool bMonospace) m_xTextView->SetControlFont(aFont); } +void SalInstanceTextView::set_font_color(const Color& rColor) +{ + if (rColor != COL_AUTO) + m_xTextView->SetControlForeground(rColor); + else + m_xTextView->SetControlForeground(); +} + void SalInstanceTextView::connect_cursor_position(const Link<TextView&, void>& rLink) { assert(!m_aCursorPositionHdl.IsSet()); |