mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 10:39:09 +02:00
do not erase background in WM_CTLCOLOR... ; force erase background in groupboxes on winxp, having black borders around buttons (fixes bug #943)
git-svn-id: trunk@7703 -
This commit is contained in:
parent
991408b9d6
commit
86419b045d
@ -752,7 +752,6 @@ Begin
|
|||||||
}
|
}
|
||||||
WM_CTLCOLORMSGBOX..WM_CTLCOLORSTATIC:
|
WM_CTLCOLORMSGBOX..WM_CTLCOLORSTATIC:
|
||||||
begin
|
begin
|
||||||
// Groupbox (which is a button) doesn't erase it's background properly
|
|
||||||
// it's needed for winxp themes where controls send the WM_ERASEBKGND
|
// it's needed for winxp themes where controls send the WM_ERASEBKGND
|
||||||
// message to their parent to clear their background and then draw
|
// message to their parent to clear their background and then draw
|
||||||
// transparently
|
// transparently
|
||||||
@ -772,10 +771,6 @@ Begin
|
|||||||
LMessage.Result := GetStockObject(HOLLOW_BRUSH);
|
LMessage.Result := GetStockObject(HOLLOW_BRUSH);
|
||||||
SetBkMode(WParam, TRANSPARENT);
|
SetBkMode(WParam, TRANSPARENT);
|
||||||
WinProcess := false;
|
WinProcess := false;
|
||||||
end else
|
|
||||||
if WindowInfo^.isGroupBox then
|
|
||||||
begin
|
|
||||||
lWinControl.EraseBackground(WParam);
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if WinProcess then
|
if WinProcess then
|
||||||
@ -892,9 +887,16 @@ Begin
|
|||||||
EraseBkgndStack := EraseBkgndStack shr EraseBkgndStackShift;
|
EraseBkgndStack := EraseBkgndStack shr EraseBkgndStackShift;
|
||||||
if (eraseBkgndCommand <> ecNoMsg) and not WindowInfo^.hasTabParent then
|
if (eraseBkgndCommand <> ecNoMsg) and not WindowInfo^.hasTabParent then
|
||||||
begin
|
begin
|
||||||
LMessage.Msg := LM_ERASEBKGND;
|
if TWin32WidgetSet(WidgetSet).ThemesActive and WindowInfo^.isGroupBox
|
||||||
LMessage.WParam := WParam;
|
and (lWinControl <> nil) then
|
||||||
LMessage.LParam := LParam;
|
begin
|
||||||
|
// Groupbox (which is a button) doesn't erase it's background properly; force repaint
|
||||||
|
lWinControl.EraseBackground(WParam);
|
||||||
|
end else begin
|
||||||
|
LMessage.Msg := LM_ERASEBKGND;
|
||||||
|
LMessage.WParam := WParam;
|
||||||
|
LMessage.LParam := LParam;
|
||||||
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
if WindowInfo^.hasTabParent and ((lWinControl = nil)
|
if WindowInfo^.hasTabParent and ((lWinControl = nil)
|
||||||
or not (csOpaque in lWinControl.ControlStyle)) then
|
or not (csOpaque in lWinControl.ControlStyle)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user