mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 08:39:35 +02:00
win32 interface: fixed themed DrawText for UTF8 text (bug #11348)
git-svn-id: trunk@15221 -
This commit is contained in:
parent
9598e8b7a7
commit
5cc276c316
@ -287,10 +287,21 @@ end;
|
||||
|
||||
procedure TWin32ThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails;
|
||||
const S: String; R: TRect; Flags, Flags2: Cardinal);
|
||||
{$IFDEF WindowsUnicodeSupport}
|
||||
var
|
||||
w: widestring;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if ThemesEnabled then
|
||||
with Details do
|
||||
{$IFDEF WindowsUnicodeSupport}
|
||||
begin
|
||||
w := UTF8Decode(S);
|
||||
DrawThemeText(Theme[Element], DC, Part, State, PWideChar(w), Length(w), Flags, Flags2, R);
|
||||
end
|
||||
{$ELSE}
|
||||
DrawThemeText(Theme[Element], DC, Part, State, PWideChar(WideString(S)), Length(S), Flags, Flags2, R)
|
||||
{$ENDIF}
|
||||
else
|
||||
inherited;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user