mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 17:20:55 +02:00
win32: draw missed focus rectangle for all themed bitbtns
git-svn-id: trunk@18250 -
This commit is contained in:
parent
d15d1c0630
commit
133caf74fd
@ -1023,6 +1023,27 @@ var
|
|||||||
then lmNotify.result := lmNotify.result or CDRFRESULT[ResultFlag];
|
then lmNotify.result := lmNotify.result or CDRFRESULT[ResultFlag];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure HandleBitBtnCustomDraw(ABitBtn: TCustomBitBtn);
|
||||||
|
var
|
||||||
|
DrawInfo: PNMCustomDraw absolute NMHdr;
|
||||||
|
ARect: TRect;
|
||||||
|
begin
|
||||||
|
case DrawInfo^.dwDrawStage of
|
||||||
|
CDDS_PREPAINT:
|
||||||
|
begin
|
||||||
|
lmNotify.result := CDRF_DODEFAULT;
|
||||||
|
WinProcess := False;
|
||||||
|
if ABitBtn.Focused then
|
||||||
|
begin
|
||||||
|
ARect := DrawInfo^.rc;
|
||||||
|
InflateRect(ARect, -3, -3);
|
||||||
|
if not IsRectEmpty(ARect) then
|
||||||
|
DrawFocusRect(DrawInfo^.hdc, ARect);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure HandleDropFiles;
|
procedure HandleDropFiles;
|
||||||
var
|
var
|
||||||
@ -1986,10 +2007,13 @@ begin
|
|||||||
idFrom := ShowHideTabPage(HWndFrom, true);
|
idFrom := ShowHideTabPage(HWndFrom, true);
|
||||||
NM_CUSTOMDRAW:
|
NM_CUSTOMDRAW:
|
||||||
begin
|
begin
|
||||||
if WindowInfo^.WinControl is TCustomListView
|
if WindowInfo^.WinControl is TCustomListView then
|
||||||
then HandleListViewCustomDraw(TCustomListViewAccess(WindowInfo^.WinControl))
|
HandleListViewCustomDraw(TCustomListViewAccess(WindowInfo^.WinControl))
|
||||||
else if GetNeedParentPaint(WindowInfo, lWinControl)
|
else
|
||||||
and WindowInfo^.ThemedCustomDraw then
|
if WindowInfo^.WinControl is TCustomBitBtn then
|
||||||
|
HandleBitBtnCustomDraw(TCustomBitBtn(WindowInfo^.WinControl))
|
||||||
|
else
|
||||||
|
if GetNeedParentPaint(WindowInfo, lWinControl) and WindowInfo^.ThemedCustomDraw then
|
||||||
begin
|
begin
|
||||||
case PNMCustomDraw(LParam)^.dwDrawStage of
|
case PNMCustomDraw(LParam)^.dwDrawStage of
|
||||||
CDDS_PREPAINT:
|
CDDS_PREPAINT:
|
||||||
|
Loading…
Reference in New Issue
Block a user