You've already forked lazarus-ccr
jvcllaz: Fix NavigationPane painting issues at runtime in JnNavPaneDemo (still issues at designtime).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5396 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1852,6 +1852,10 @@ end;
|
|||||||
|
|
||||||
procedure TJvCustomNavigationPane.WMEraseBkgnd(var Msg: TLMEraseBkgnd);
|
procedure TJvCustomNavigationPane.WMEraseBkgnd(var Msg: TLMEraseBkgnd);
|
||||||
begin
|
begin
|
||||||
|
exit;
|
||||||
|
// wp: the following code causes massive painting issues.
|
||||||
|
|
||||||
|
|
||||||
// DEV: Doesn't clear, remove if...
|
// DEV: Doesn't clear, remove if...
|
||||||
//if ActivePage = nil then
|
//if ActivePage = nil then
|
||||||
begin
|
begin
|
||||||
@ -2397,6 +2401,7 @@ begin
|
|||||||
ACanvas.Font := Font;
|
ACanvas.Font := Font;
|
||||||
SetBkMode(ACanvas.Handle, TRANSPARENT);
|
SetBkMode(ACanvas.Handle, TRANSPARENT);
|
||||||
DrawText(ACanvas, Caption, Length(Caption), R, DT_SINGLELINE or DT_VCENTER);
|
DrawText(ACanvas, Caption, Length(Caption), R, DT_SINGLELINE or DT_VCENTER);
|
||||||
|
SetBkMode(ACanvas.Handle, OPAQUE);
|
||||||
end;
|
end;
|
||||||
if Colors.ButtonSeparatorColor <> clNone then
|
if Colors.ButtonSeparatorColor <> clNone then
|
||||||
begin
|
begin
|
||||||
@ -3527,6 +3532,7 @@ begin
|
|||||||
OffsetRect(R, 0, -Images.Height div 2);
|
OffsetRect(R, 0, -Images.Height div 2);
|
||||||
DrawText(Canvas, Caption, Length(Caption), R,
|
DrawText(Canvas, Caption, Length(Caption), R,
|
||||||
cAlignment[Alignment] or cWordWrap[WordWrap] or DT_VCENTER or DT_NOPREFIX or DT_END_ELLIPSIS);
|
cAlignment[Alignment] or cWordWrap[WordWrap] or DT_VCENTER or DT_NOPREFIX or DT_END_ELLIPSIS);
|
||||||
|
SetBkMode(Canvas.Handle, OPAQUE);
|
||||||
end;
|
end;
|
||||||
if IsValidImage then
|
if IsValidImage then
|
||||||
begin
|
begin
|
||||||
@ -3768,6 +3774,7 @@ begin
|
|||||||
SetBkMode(Canvas.Handle, TRANSPARENT);
|
SetBkMode(Canvas.Handle, TRANSPARENT);
|
||||||
DrawText(Canvas, Caption, Length(Caption), R,
|
DrawText(Canvas, Caption, Length(Caption), R,
|
||||||
DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or DT_EDITCONTROL or cAlignment[Alignment]);
|
DT_SINGLELINE or DT_VCENTER or DT_NOPREFIX or DT_EDITCONTROL or cAlignment[Alignment]);
|
||||||
|
SetBkMode(Canvas.Handle, OPAQUE);
|
||||||
end;
|
end;
|
||||||
Canvas.Pen.Color := FrameColor;
|
Canvas.Pen.Color := FrameColor;
|
||||||
Canvas.MoveTo(0, ClientHeight - 1);
|
Canvas.MoveTo(0, ClientHeight - 1);
|
||||||
@ -4911,6 +4918,7 @@ DrawButton:
|
|||||||
DrawText(Canvas, Caption, Length(Caption), R, DT_LEFT or DT_VCENTER or DT_NOPREFIX or DT_END_ELLIPSIS);
|
DrawText(Canvas, Caption, Length(Caption), R, DT_LEFT or DT_VCENTER or DT_NOPREFIX or DT_END_ELLIPSIS);
|
||||||
Inc(R.Right, 3 + 7);
|
Inc(R.Right, 3 + 7);
|
||||||
InflateRect(R, 2, 0);
|
InflateRect(R, 2, 0);
|
||||||
|
SetBkMode(Canvas.Handle, OPAQUE);
|
||||||
end;
|
end;
|
||||||
R.Left := R.Right - 11;
|
R.Left := R.Right - 11;
|
||||||
Dec(R.Right, 4);
|
Dec(R.Right, 4);
|
||||||
|
Reference in New Issue
Block a user