Owner Draw on Tstatusbar panels not working right with GTK2
Original Reporter info from Mantis: snorkel
-
Reporter name:
Original Reporter info from Mantis: snorkel
- Reporter name:
Description:
When doing a owner draw on a status bar panel with a image and text
it appears to write the standard caption as well as the owner drawn.
Steps to reproduce:
Add a panel to status bar, set style to ownerdrawn. Then in the DrawPanel event some code like this:
procedure TMainForm.MainStatusBarDrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
var
image_index:integer;
begin
with statusbar.Canvas do
case panel.Index of
0:begin
image_index:=48;
Font.Style := [fsBold];
end;
2: begin
image_index:=49;
Font.Style := [fsBold];
end;
4:begin
image_index:=50;
Font.Style := [fsBold];
end;
end;
maindatamod.MenuImages.Draw(StatusBar.Canvas, Rect.Left, Rect.Top,image_index) ;
TextRect(Rect,2 + maindatamod.MenuImages.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
end;
Mantis conversion info:
- Mantis ID: 27695
- OS: NetRunner KDE 64bit
- OS Build: 2014.09
- Platform: GTK2
- Version: 1.4RC2
- Fixed in version: 1.5 (SVN)
- Fixed in revision: 48435 (#344723bd)
- Monitored by: » snorkel (snorkel)
- Target version: 1.4RC2
- LazTarget: 1.4