mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 20:40:40 +02:00
ixed painting icons in package editor
git-svn-id: trunk@8586 -
This commit is contained in:
parent
48a4a5950c
commit
248fa55c77
@ -203,6 +203,7 @@ begin
|
|||||||
FCanvas.Brush.Color:=clWindow;
|
FCanvas.Brush.Color:=clWindow;
|
||||||
FCanvas.Font.Color:=clWindowText;
|
FCanvas.Font.Color:=clWindowText;
|
||||||
end;
|
end;
|
||||||
|
//DebugLn('TCustomListBox.LMDrawListItem ',DbgSName(Self));
|
||||||
DrawItem(ItemID, Area, ItemState);
|
DrawItem(ItemID, Area, ItemState);
|
||||||
if odFocused in ItemState then
|
if odFocused in ItemState then
|
||||||
{DrawFocusRect(hDC, rcItem)};
|
{DrawFocusRect(hDC, rcItem)};
|
||||||
@ -369,6 +370,7 @@ procedure TCustomListBox.DrawItem(Index: Integer; ARect: TRect;
|
|||||||
Flags: Longint;
|
Flags: Longint;
|
||||||
Data: String;}
|
Data: String;}
|
||||||
begin
|
begin
|
||||||
|
//DebugLn('TCustomListBox.DrawItem ',DbgSName(Self));
|
||||||
if Assigned(FOnDrawItem) then
|
if Assigned(FOnDrawItem) then
|
||||||
FOnDrawItem(Self, Index, ARect, State)
|
FOnDrawItem(Self, Index, ARect, State)
|
||||||
else if not (odPainted in State) then
|
else if not (odPainted in State) then
|
||||||
|
@ -110,9 +110,7 @@ begin
|
|||||||
DC:=GetDC(HWnd(Widget));
|
DC:=GetDC(HWnd(Widget));
|
||||||
ItemState:=State;
|
ItemState:=State;
|
||||||
end;
|
end;
|
||||||
//DebugLn('gtkListItemDrawCB A LCLList=',DbgS(LCLList),' Widget=',DbgS(Widget),' ',DbgS(Data));
|
//DebugLn('gtkListItemDrawAfterCB ',DbgSName(LCLList.Owner),' Widget=',DbgS(Widget));
|
||||||
//DebugLn('gtkListItemDrawCB B ',LCLList.ClassName,' ',DbgS(LCLList.Owner);
|
|
||||||
//DebugLn('gtkListItemDrawCB C ',LCLList.Owner.ClassName);
|
|
||||||
Result := DeliverMessage(LCLList.Owner, Msg)=0;
|
Result := DeliverMessage(LCLList.Owner, Msg)=0;
|
||||||
ReleaseDC(HWnd(Widget),Msg.DrawListItemStruct^.DC);
|
ReleaseDC(HWnd(Widget),Msg.DrawListItemStruct^.DC);
|
||||||
finally
|
finally
|
||||||
|
@ -739,6 +739,7 @@ var
|
|||||||
IconHeight: Integer;
|
IconHeight: Integer;
|
||||||
CurRect: TRect;
|
CurRect: TRect;
|
||||||
begin
|
begin
|
||||||
|
//DebugLn('TPackageEditorForm.RegisteredListBoxDrawItem START');
|
||||||
if LazPackage=nil then exit;
|
if LazPackage=nil then exit;
|
||||||
if (Index<0) or (Index>=FPlugins.Count) then exit;
|
if (Index<0) or (Index>=FPlugins.Count) then exit;
|
||||||
CurObject:=FPlugins.Objects[Index];
|
CurObject:=FPlugins.Objects[Index];
|
||||||
@ -757,6 +758,7 @@ begin
|
|||||||
CurRect.Right:=ARect.Left+25;
|
CurRect.Right:=ARect.Left+25;
|
||||||
FillRect(CurRect);
|
FillRect(CurRect);
|
||||||
CurIcon:=CurComponent.Icon;
|
CurIcon:=CurComponent.Icon;
|
||||||
|
//DebugLn('TPackageEditorForm.RegisteredListBoxDrawItem ',DbgSName(CurIcon),' ',CurComponent.ComponentClass.ClassName);
|
||||||
if CurIcon<>nil then begin
|
if CurIcon<>nil then begin
|
||||||
IconWidth:=CurIcon.Width;
|
IconWidth:=CurIcon.Width;
|
||||||
IconHeight:=CurIcon.Height;
|
IconHeight:=CurIcon.Height;
|
||||||
@ -1427,54 +1429,56 @@ begin
|
|||||||
AddToUsesPkgSectionCheckBox:=TCheckBox.Create(Self);
|
AddToUsesPkgSectionCheckBox:=TCheckBox.Create(Self);
|
||||||
with AddToUsesPkgSectionCheckBox do begin
|
with AddToUsesPkgSectionCheckBox do begin
|
||||||
Name:='AddToUsesPkgSectionCheckBox';
|
Name:='AddToUsesPkgSectionCheckBox';
|
||||||
Parent:=FilePropsGroupBox;
|
|
||||||
Caption:=lisPkgMangUseUnit;
|
Caption:=lisPkgMangUseUnit;
|
||||||
UseOnChange:=true;
|
UseOnChange:=true;
|
||||||
OnClick:=@AddToUsesPkgSectionCheckBoxClick;
|
OnClick:=@AddToUsesPkgSectionCheckBoxClick;
|
||||||
Hint:=lisPkgMangAddUnitToUsesClauseOfPackageDisableThisOnlyForUnit;
|
Hint:=lisPkgMangAddUnitToUsesClauseOfPackageDisableThisOnlyForUnit;
|
||||||
ShowHint:=true;
|
ShowHint:=true;
|
||||||
|
Parent:=FilePropsGroupBox;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
RegisteredPluginsGroupBox:=TGroupBox.Create(Self);
|
RegisteredPluginsGroupBox:=TGroupBox.Create(Self);
|
||||||
with RegisteredPluginsGroupBox do begin
|
with RegisteredPluginsGroupBox do begin
|
||||||
Name:='RegisteredPluginsGroupBox';
|
Name:='RegisteredPluginsGroupBox';
|
||||||
Parent:=FilePropsGroupBox;
|
|
||||||
Caption:=lisPckEditRegisteredPlugins;
|
Caption:=lisPckEditRegisteredPlugins;
|
||||||
|
Parent:=FilePropsGroupBox;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
RegisteredListBox:=TListBox.Create(Self);
|
RegisteredListBox:=TListBox.Create(Self);
|
||||||
with RegisteredListBox do begin
|
with RegisteredListBox do begin
|
||||||
Name:='RegisteredListBox';
|
Name:='RegisteredListBox';
|
||||||
Parent:=RegisteredPluginsGroupBox;
|
|
||||||
Align:=alClient;
|
Align:=alClient;
|
||||||
ItemHeight:=23;
|
ItemHeight:=23;
|
||||||
OnDrawItem:=@RegisteredListBoxDrawItem;
|
OnDrawItem:=@RegisteredListBoxDrawItem;
|
||||||
|
Style:= lbOwnerDrawFixed;
|
||||||
|
Parent:=RegisteredPluginsGroupBox;
|
||||||
|
//DebugLn('TPackageEditorForm.SetupComponents AAAAAAAAAA');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
UseMinVersionCheckBox:=TCheckBox.Create(Self);
|
UseMinVersionCheckBox:=TCheckBox.Create(Self);
|
||||||
with UseMinVersionCheckBox do begin
|
with UseMinVersionCheckBox do begin
|
||||||
Name:='UseMinVersionCheckBox';
|
Name:='UseMinVersionCheckBox';
|
||||||
Parent:=FilePropsGroupBox;
|
|
||||||
Caption:=lisPckEditMinimumVersion;
|
Caption:=lisPckEditMinimumVersion;
|
||||||
UseOnChange:=true;
|
UseOnChange:=true;
|
||||||
OnClick:=@UseMinVersionCheckBoxClick;
|
OnClick:=@UseMinVersionCheckBoxClick;
|
||||||
|
Parent:=FilePropsGroupBox;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MinVersionEdit:=TEdit.Create(Self);
|
MinVersionEdit:=TEdit.Create(Self);
|
||||||
with MinVersionEdit do begin
|
with MinVersionEdit do begin
|
||||||
Name:='MinVersionEdit';
|
Name:='MinVersionEdit';
|
||||||
Parent:=FilePropsGroupBox;
|
|
||||||
Text:='';
|
Text:='';
|
||||||
OnChange:=@MinVersionEditChange;
|
OnChange:=@MinVersionEditChange;
|
||||||
|
Parent:=FilePropsGroupBox;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
UseMaxVersionCheckBox:=TCheckBox.Create(Self);
|
UseMaxVersionCheckBox:=TCheckBox.Create(Self);
|
||||||
with UseMaxVersionCheckBox do begin
|
with UseMaxVersionCheckBox do begin
|
||||||
Name:='UseMaxVersionCheckBox';
|
Name:='UseMaxVersionCheckBox';
|
||||||
Parent:=FilePropsGroupBox;
|
|
||||||
Caption:=lisPckEditMaximumVersion;
|
Caption:=lisPckEditMaximumVersion;
|
||||||
UseOnChange:=true;
|
UseOnChange:=true;
|
||||||
OnClick:=@UseMaxVersionCheckBoxClick;
|
OnClick:=@UseMaxVersionCheckBoxClick;
|
||||||
|
Parent:=FilePropsGroupBox;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MaxVersionEdit:=TEdit.Create(Self);
|
MaxVersionEdit:=TEdit.Create(Self);
|
||||||
|
Loading…
Reference in New Issue
Block a user