mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:56:06 +02:00
win32 interface: menu drawing, only convert from UTF-8 once
git-svn-id: trunk@13297 -
This commit is contained in:
parent
596a4ef548
commit
9d4fd2cb03
@ -472,15 +472,9 @@ begin
|
||||
|
||||
{$ifdef WindowsUnicodeSupport}
|
||||
if UnicodeEnabledOS then
|
||||
begin
|
||||
WideBuffer := Utf8Decode(aMenuItem.Caption);
|
||||
DrawTextW(aHDC, PWideChar(WideBuffer), length(WideBuffer), @aRect, dtFlags);
|
||||
end
|
||||
DrawTextW(aHDC, PWideChar(WideBuffer), length(WideBuffer), @aRect, dtFlags)
|
||||
else
|
||||
begin
|
||||
AnsiBuffer := Utf8ToAnsi(aMenuItem.Caption);
|
||||
DrawText(aHDC, pChar(AnsiBuffer), length(AnsiBuffer), @aRect, dtFlags);
|
||||
end;
|
||||
{$else}
|
||||
DrawText(aHDC, pChar(aMenuItem.Caption), length(aMenuItem.Caption), @aRect, dtFlags);
|
||||
{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user