mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:59:06 +02:00
win32: paint menu text with a transparent text background (by cobines, issue #0018424)
git-svn-id: trunk@35911 -
This commit is contained in:
parent
7763dcfc36
commit
a452a818da
@ -966,6 +966,7 @@ procedure DrawMenuItemText(const AMenuItem: TMenuItem; const AHDC: HDC;
|
|||||||
var
|
var
|
||||||
crText: COLORREF;
|
crText: COLORREF;
|
||||||
crBkgnd: COLORREF;
|
crBkgnd: COLORREF;
|
||||||
|
oldBkMode: Longint;
|
||||||
shortCutText: string;
|
shortCutText: string;
|
||||||
IsRightToLeft: Boolean;
|
IsRightToLeft: Boolean;
|
||||||
etoFlags: Cardinal;
|
etoFlags: Cardinal;
|
||||||
@ -1027,6 +1028,8 @@ begin
|
|||||||
Dec(ARect.Top, 1);
|
Dec(ARect.Top, 1);
|
||||||
Dec(ARect.Bottom, 1);
|
Dec(ARect.Bottom, 1);
|
||||||
|
|
||||||
|
oldBkMode := SetBkMode(AHDC, TRANSPARENT);
|
||||||
|
|
||||||
{$ifdef WindowsUnicodeSupport}
|
{$ifdef WindowsUnicodeSupport}
|
||||||
if UnicodeEnabledOS then
|
if UnicodeEnabledOS then
|
||||||
begin
|
begin
|
||||||
@ -1066,6 +1069,8 @@ begin
|
|||||||
DrawText(AHDC, PChar(shortCutText), Length(shortCutText), @ARect, dtFlags);
|
DrawText(AHDC, PChar(shortCutText), Length(shortCutText), @ARect, dtFlags);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
SetBkMode(AHDC, oldBkMode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure DrawMenuItemIcon(const AMenuItem: TMenuItem; const AHDC: HDC;
|
procedure DrawMenuItemIcon(const AMenuItem: TMenuItem; const AHDC: HDC;
|
||||||
|
Loading…
Reference in New Issue
Block a user