From 19f4ebd8a54da0ae03b9cc8481613e5cd20ee1e7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 12 Nov 2012 21:17:37 +0000 Subject: use SetControlForeground instead of SetTextColor because that's persistent across unrelated style changes otherwise setting e.g. alignment will reset the color to default black Change-Id: I2b975c3914a59a93e54d72aa0975a066b5edf533 --- vcl/source/control/fixedhyper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/source/control') diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index 87aa06fddbad..9bfd0b880b70 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -49,7 +49,7 @@ void FixedHyperlink::Initialize() aFont.SetUnderline( UNDERLINE_SINGLE ); SetControlFont( aFont ); // changes the color to light blue - SetTextColor( Color( COL_LIGHTBLUE ) ); + SetControlForeground( Color( COL_LIGHTBLUE ) ); // calculates text len m_nTextLen = GetCtrlTextWidth( GetText() ); } @@ -85,7 +85,7 @@ void FixedHyperlink::GetFocus() void FixedHyperlink::LoseFocus() { - SetTextColor( Color( COL_LIGHTBLUE ) ); + SetTextColor( GetControlForeground() ); Paint( Rectangle( Point(), GetSizePixel() ) ); HideFocus(); } -- cgit