ixed painting icons in package editor

git-svn-id: trunk@8586 -
This commit is contained in:
mattias 2006-01-21 00:17:37 +00:00
parent 48a4a5950c
commit 248fa55c77
3 changed files with 13 additions and 9 deletions

View File

@ -203,6 +203,7 @@ begin
FCanvas.Brush.Color:=clWindow;
FCanvas.Font.Color:=clWindowText;
end;
//DebugLn('TCustomListBox.LMDrawListItem ',DbgSName(Self));
DrawItem(ItemID, Area, ItemState);
if odFocused in ItemState then
{DrawFocusRect(hDC, rcItem)};
@ -369,6 +370,7 @@ procedure TCustomListBox.DrawItem(Index: Integer; ARect: TRect;
Flags: Longint;
Data: String;}
begin
//DebugLn('TCustomListBox.DrawItem ',DbgSName(Self));
if Assigned(FOnDrawItem) then
FOnDrawItem(Self, Index, ARect, State)
else if not (odPainted in State) then

View File

@ -110,9 +110,7 @@ begin
DC:=GetDC(HWnd(Widget));
ItemState:=State;
end;
//DebugLn('gtkListItemDrawCB A LCLList=',DbgS(LCLList),' Widget=',DbgS(Widget),' ',DbgS(Data));
//DebugLn('gtkListItemDrawCB B ',LCLList.ClassName,' ',DbgS(LCLList.Owner);
//DebugLn('gtkListItemDrawCB C ',LCLList.Owner.ClassName);
//DebugLn('gtkListItemDrawAfterCB ',DbgSName(LCLList.Owner),' Widget=',DbgS(Widget));
Result := DeliverMessage(LCLList.Owner, Msg)=0;
ReleaseDC(HWnd(Widget),Msg.DrawListItemStruct^.DC);
finally

View File

@ -739,6 +739,7 @@ var
IconHeight: Integer;
CurRect: TRect;
begin
//DebugLn('TPackageEditorForm.RegisteredListBoxDrawItem START');
if LazPackage=nil then exit;
if (Index<0) or (Index>=FPlugins.Count) then exit;
CurObject:=FPlugins.Objects[Index];
@ -757,6 +758,7 @@ begin
CurRect.Right:=ARect.Left+25;
FillRect(CurRect);
CurIcon:=CurComponent.Icon;
//DebugLn('TPackageEditorForm.RegisteredListBoxDrawItem ',DbgSName(CurIcon),' ',CurComponent.ComponentClass.ClassName);
if CurIcon<>nil then begin
IconWidth:=CurIcon.Width;
IconHeight:=CurIcon.Height;
@ -1427,54 +1429,56 @@ begin
AddToUsesPkgSectionCheckBox:=TCheckBox.Create(Self);
with AddToUsesPkgSectionCheckBox do begin
Name:='AddToUsesPkgSectionCheckBox';
Parent:=FilePropsGroupBox;
Caption:=lisPkgMangUseUnit;
UseOnChange:=true;
OnClick:=@AddToUsesPkgSectionCheckBoxClick;
Hint:=lisPkgMangAddUnitToUsesClauseOfPackageDisableThisOnlyForUnit;
ShowHint:=true;
Parent:=FilePropsGroupBox;
end;
RegisteredPluginsGroupBox:=TGroupBox.Create(Self);
with RegisteredPluginsGroupBox do begin
Name:='RegisteredPluginsGroupBox';
Parent:=FilePropsGroupBox;
Caption:=lisPckEditRegisteredPlugins;
Parent:=FilePropsGroupBox;
end;
RegisteredListBox:=TListBox.Create(Self);
with RegisteredListBox do begin
Name:='RegisteredListBox';
Parent:=RegisteredPluginsGroupBox;
Align:=alClient;
ItemHeight:=23;
OnDrawItem:=@RegisteredListBoxDrawItem;
Style:= lbOwnerDrawFixed;
Parent:=RegisteredPluginsGroupBox;
//DebugLn('TPackageEditorForm.SetupComponents AAAAAAAAAA');
end;
UseMinVersionCheckBox:=TCheckBox.Create(Self);
with UseMinVersionCheckBox do begin
Name:='UseMinVersionCheckBox';
Parent:=FilePropsGroupBox;
Caption:=lisPckEditMinimumVersion;
UseOnChange:=true;
OnClick:=@UseMinVersionCheckBoxClick;
Parent:=FilePropsGroupBox;
end;
MinVersionEdit:=TEdit.Create(Self);
with MinVersionEdit do begin
Name:='MinVersionEdit';
Parent:=FilePropsGroupBox;
Text:='';
OnChange:=@MinVersionEditChange;
Parent:=FilePropsGroupBox;
end;
UseMaxVersionCheckBox:=TCheckBox.Create(Self);
with UseMaxVersionCheckBox do begin
Name:='UseMaxVersionCheckBox';
Parent:=FilePropsGroupBox;
Caption:=lisPckEditMaximumVersion;
UseOnChange:=true;
OnClick:=@UseMaxVersionCheckBoxClick;
Parent:=FilePropsGroupBox;
end;
MaxVersionEdit:=TEdit.Create(Self);