View Issue Details

IDProjectCategoryView StatusLast Update
0027695LazarusLCLpublic2015-03-23 20:35
ReportersnorkelAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGTK2OSNetRunner KDE 64bitOS Version2014.09
Product Version1.4RC2Product Build 
Target Version1.4RC2Fixed in Version1.5 (SVN) 
Summary0027695: Owner Draw on Tstatusbar panels not working right with GTK2
DescriptionWhen 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 ReproduceAdd 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;

TagsNo tags attached.
Fixed in Revision48435
LazTarget1.4
WidgetsetGTK 2
Attached Files

Activities

snorkel

2015-03-19 23:02

reporter  

snapshot2.png (12,806 bytes)
snapshot2.png (12,806 bytes)

snorkel

2015-03-19 23:04

reporter   ~0082115

Forgot to add only GTK2 is afffected, works fine on other widget sets including QT and win32/64

Zeljan Rikalo

2015-03-20 08:27

developer   ~0082119

Please attach example project.

Zeljan Rikalo

2015-03-20 20:56

developer   ~0082148

Please test and close if ok. Will be merged to 1.4.

snorkel

2015-03-23 17:23

reporter   ~0082222

I worked around by doing a fillrect in my code, prior to doing any other owner drawing commands.

I can test if there will be another release canidate. I don't have the SVN version installed.

Zeljan Rikalo

2015-03-23 20:35

developer   ~0082237

Check here: http://wiki.lazarus.freepascal.org/Lazarus_1.4_fixes_branch
This issue is fixed in trunk, but still waiting to be merged to 1.4 fixes.
It will be in 1.4 release definitelly.

Issue History

Date Modified Username Field Change
2015-03-19 23:02 snorkel New Issue
2015-03-19 23:02 snorkel File Added: snapshot2.png
2015-03-19 23:04 snorkel Note Added: 0082115
2015-03-20 08:27 Zeljan Rikalo LazTarget => -
2015-03-20 08:27 Zeljan Rikalo Note Added: 0082119
2015-03-20 08:27 Zeljan Rikalo Assigned To => Zeljan Rikalo
2015-03-20 08:27 Zeljan Rikalo Status new => feedback
2015-03-20 20:56 Zeljan Rikalo Fixed in Revision => 48435
2015-03-20 20:56 Zeljan Rikalo LazTarget - => 1.4
2015-03-20 20:56 Zeljan Rikalo Note Added: 0082148
2015-03-20 20:56 Zeljan Rikalo Status feedback => resolved
2015-03-20 20:56 Zeljan Rikalo Fixed in Version => 1.5 (SVN)
2015-03-20 20:56 Zeljan Rikalo Resolution open => fixed
2015-03-20 20:56 Zeljan Rikalo Target Version => 1.4RC2
2015-03-23 17:23 snorkel Note Added: 0082222
2015-03-23 20:35 Zeljan Rikalo Note Added: 0082237