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:
paul 2009-01-17 10:41:01 +00:00
parent 9c9c8716f2
commit f71d89b2b3
2 changed files with 8 additions and 6 deletions

View File

@ -88,9 +88,12 @@ end;
procedure TStatusBar.LMDrawItem(var Message: TLMDrawItems);
begin
if assigned(FOnDrawPanel) then
if Assigned(FOnDrawPanel) then
with Message.DrawItemStruct^ do
FOnDrawPanel(Self,Panels[itemID],rcItem);
begin
Canvas.Handle := _hDC;
FOnDrawPanel(Self, Panels[itemID], rcItem);
end;
end;
procedure TStatusBar.BoundsChanged;

View File

@ -270,10 +270,9 @@ begin
taCenter: Text := #9 + Text;
taRightJustify: Text := #9#9 + Text;
end;
if StatusPanel.Style=psOwnerDraw then
WParam := SBT_OWNERDRAW
else
WParam := StatusBevelMap[StatusPanel.Bevel];
WParam := StatusBevelMap[StatusPanel.Bevel];
if StatusPanel.Style = psOwnerDraw then
WParam := WParam or SBT_OWNERDRAW;
WParam := WParam or StatusPanel.Index;
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then