summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-28 14:34:17 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-10-03 17:20:11 +0200
commitf9c6022d109062d9b13339463f363892b2439d7d (patch)
treef6a09a4515d8d3293e6566446d32f07d36ca0f37
parent5c7a82a0d3db4e6e9d0ecb252c307a0b6075f41e (diff)
Resolves: tdf#112656 don't reset to default font if a custom font was set
the list has been laid out with the smaller custom font, including calculating the bounding box of the entry, then rendered with the default larger font Change-Id: I2ae569c9857d4e1016cbf55da4c3334c63dcf5f6 Reviewed-on: https://gerrit.libreoffice.org/42910 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 3043863d688c5bbd5101ebd5ddd8a9452e05ca50) Reviewed-on: https://gerrit.libreoffice.org/43031 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--svtools/source/contnr/treelistbox.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 3230e19ae405..e308f0708afc 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3588,12 +3588,9 @@ void SvTreeListBox::StateChanged( StateChangedType eType )
void SvTreeListBox::ApplySettings(vcl::RenderContext& rRenderContext)
{
- const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor(rStyleSettings.GetWindowTextColor());
- SetPointFont(rRenderContext, aFont);
+ SetPointFont(rRenderContext, GetPointFont(*this));
+ const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor());
rRenderContext.SetTextFillColor();
rRenderContext.SetBackground(rStyleSettings.GetFieldColor());