PoChecker: fix missing icons in GraphStat ListView on Linux GTK2

git-svn-id: trunk@46266 -
This commit is contained in:
bart 2014-09-20 15:49:39 +00:00
parent cccbde05f6
commit d9d7efd73d
3 changed files with 16 additions and 7 deletions

View File

@ -77,7 +77,6 @@
<Unit1>
<Filename Value="..\pofamilies.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="PoFamilies"/>
</Unit1>
<Unit2>
<Filename Value="..\resultdlg.pp"/>
@ -90,12 +89,10 @@
<Unit3>
<Filename Value="..\simplepofiles.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="SimplePoFiles"/>
</Unit3>
<Unit4>
<Filename Value="..\pocheckerconsts.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="pocheckerconsts"/>
</Unit4>
<Unit5>
<Filename Value="..\pocheckermain.pp"/>

View File

@ -6,6 +6,7 @@ object GraphStatForm: TGraphStatForm
Caption = 'Graphical summary'
ClientHeight = 544
ClientWidth = 636
OnActivate = FormActivate
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
@ -42,7 +43,7 @@ object GraphStatForm: TGraphStatForm
Left = 104
Height = 15
Top = 17
Width = 83
Width = 100
Caption = 'TranslatedLabel'
ParentColor = False
end
@ -50,7 +51,7 @@ object GraphStatForm: TGraphStatForm
Left = 104
Height = 15
Top = 36
Width = 98
Width = 118
Caption = 'UnTranslatedLabel'
ParentColor = False
end
@ -58,7 +59,7 @@ object GraphStatForm: TGraphStatForm
Left = 104
Height = 15
Top = 55
Width = 57
Width = 70
Caption = 'FuzzyLabel'
ParentColor = False
end

View File

@ -8,6 +8,10 @@ uses
Classes, SysUtils, Types, FileUtil, Forms, Controls, Graphics, Dialogs,
ExtCtrls, PoFamilies, PoCheckerConsts, LCLProc, StdCtrls, ComCtrls;
{$ifndef windows}
{$define lv_}
{$endif}
type
{ TGraphStatForm }
@ -21,6 +25,7 @@ type
TranslatedShape: TShape;
UnTranslatedShape: TShape;
FuzzyShape: TShape;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
@ -76,7 +81,6 @@ const
procedure TGraphStatForm.FormShow(Sender: TObject);
begin
DrawGraphs;
FOldHintHidePause := Application.HintHidePause;
Application.HintHidePause := 5000;
end;
@ -125,6 +129,12 @@ begin
Application.HintHidePause := FOldHintHidePause;
end;
procedure TGraphStatForm.FormActivate(Sender: TObject);
begin
//Doing this in TGraphStatForm.FormShow results in icons disappearing in Linux GTK2
DrawGraphs;
end;
procedure TGraphStatForm.FormDestroy(Sender: TObject);
begin
if Assigned(FImgList) then FImgList.Free;
@ -201,6 +211,7 @@ var
begin
if Assigned(FImgList) then FImgList.Free;
FImgList := TImageList.CreateSize(BmpWH, BmpWH);
ListView.Clear;
ListView.LargeImages := FImgList;
ListView.BeginUpdate;
try