Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,095
    • Issues 2,095
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #27695
Closed
Open
Created Mar 19, 2015 by FPC Admin account@fpc_adminOwner

Owner Draw on Tstatusbar panels not working right with GTK2

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
Assignee
Assign to
Time tracking