mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 19:20:41 +02:00
lcl: fix owner drawn statusbar panels
- don't skip TStatusPanel.Bevel - assign passed in the WM_DrawItem Message DC to the Canvas.Handle git-svn-id: trunk@18318 -
This commit is contained in:
parent
9c9c8716f2
commit
f71d89b2b3
@ -88,9 +88,12 @@ end;
|
|||||||
|
|
||||||
procedure TStatusBar.LMDrawItem(var Message: TLMDrawItems);
|
procedure TStatusBar.LMDrawItem(var Message: TLMDrawItems);
|
||||||
begin
|
begin
|
||||||
if assigned(FOnDrawPanel) then
|
if Assigned(FOnDrawPanel) then
|
||||||
with Message.DrawItemStruct^ do
|
with Message.DrawItemStruct^ do
|
||||||
FOnDrawPanel(Self,Panels[itemID],rcItem);
|
begin
|
||||||
|
Canvas.Handle := _hDC;
|
||||||
|
FOnDrawPanel(Self, Panels[itemID], rcItem);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStatusBar.BoundsChanged;
|
procedure TStatusBar.BoundsChanged;
|
||||||
|
@ -270,10 +270,9 @@ begin
|
|||||||
taCenter: Text := #9 + Text;
|
taCenter: Text := #9 + Text;
|
||||||
taRightJustify: Text := #9#9 + Text;
|
taRightJustify: Text := #9#9 + Text;
|
||||||
end;
|
end;
|
||||||
if StatusPanel.Style=psOwnerDraw then
|
WParam := StatusBevelMap[StatusPanel.Bevel];
|
||||||
WParam := SBT_OWNERDRAW
|
if StatusPanel.Style = psOwnerDraw then
|
||||||
else
|
WParam := WParam or SBT_OWNERDRAW;
|
||||||
WParam := StatusBevelMap[StatusPanel.Bevel];
|
|
||||||
WParam := WParam or StatusPanel.Index;
|
WParam := WParam or StatusPanel.Index;
|
||||||
{$ifdef WindowsUnicodeSupport}
|
{$ifdef WindowsUnicodeSupport}
|
||||||
if UnicodeEnabledOS then
|
if UnicodeEnabledOS then
|
||||||
|
Loading…
Reference in New Issue
Block a user