IDE: Scale the select button's icon in ComponentList. Issue #37887.

git-svn-id: trunk@64775 -
This commit is contained in:
juha 2021-03-10 08:56:20 +00:00
parent 7c5af88d6b
commit 5106c16eef
3 changed files with 6 additions and 5 deletions

View File

@ -41,7 +41,7 @@ uses
// LazControls // LazControls
TreeFilterEdit, TreeFilterEdit,
// IdeIntf // IdeIntf
FormEditingIntf, PropEdits, ComponentReg, FormEditingIntf, IDEImagesIntf, PropEdits, ComponentReg,
// IDE // IDE
LazarusIDEStrConsts, PackageDefs, IDEOptionDefs, EnvironmentOpts, Designer; LazarusIDEStrConsts, PackageDefs, IDEOptionDefs, EnvironmentOpts, Designer;
@ -135,8 +135,8 @@ begin
Name:=NonModalIDEWindowNames[nmiwComponentList]; Name:=NonModalIDEWindowNames[nmiwComponentList];
FActiveTree := ListTree; FActiveTree := ListTree;
IDEImages.AssignImage(SelectionToolButton, 'tmouse');
with SelectionToolButton do begin with SelectionToolButton do begin
LoadGlyphFromResourceName(hInstance, 'tmouse');
ShowHint := EnvironmentOptions.ShowHintsForComponentPalette; ShowHint := EnvironmentOptions.ShowHintsForComponentPalette;
Width := ComponentPaletteBtnWidth; Width := ComponentPaletteBtnWidth;
BorderSpacing.Around := (FilterPanel.Height - ComponentPaletteImageHeight) div 2; BorderSpacing.Around := (FilterPanel.Height - ComponentPaletteImageHeight) div 2;

View File

@ -403,18 +403,18 @@ end;
procedure TComponentPage.CreateSelectionButton(aButtonUniqueName: string; aScrollBox: TScrollBox); procedure TComponentPage.CreateSelectionButton(aButtonUniqueName: string; aScrollBox: TScrollBox);
var var
{%H-}Pal: TComponentPalette; Pal: TComponentPalette;
Btn: TSpeedButton; Btn: TSpeedButton;
begin begin
if Assigned(SelectButton) then Exit; if Assigned(SelectButton) then Exit;
Pal := TComponentPalette(Palette); Pal := TComponentPalette(Palette);
Btn := TSpeedButton.Create(nil); Btn := TSpeedButton.Create(nil);
SelectButton:=Btn; SelectButton:=Btn;
IDEImages.AssignImage(Btn, 'tmouse');
with Btn do begin with Btn do begin
Name := CompPalSelectionToolBtnPrefix + aButtonUniqueName; Name := CompPalSelectionToolBtnPrefix + aButtonUniqueName;
OnClick := @Pal.SelectionToolClick; OnClick := @Pal.SelectionToolClick;
OnMouseWheel := @Pal.OnPageMouseWheel; OnMouseWheel := @Pal.OnPageMouseWheel;
IDEImages.AssignImage(Btn, 'tmouse');
Flat := True; Flat := True;
GroupIndex:= 1; GroupIndex:= 1;
Down := True; Down := True;

View File

@ -346,7 +346,8 @@ type
procedure DrawForControl(ACanvas: TCanvas; AX, AY, AIndex, AImageWidthAt96PPI: Integer; procedure DrawForControl(ACanvas: TCanvas; AX, AY, AIndex, AImageWidthAt96PPI: Integer;
AControl: TControl; ADrawEffect: TGraphicsDrawEffect); overload; AControl: TControl; ADrawEffect: TGraphicsDrawEffect); overload;
property ResolutionForControl[AImageWidth: Integer; AControl: TControl]: TScaledImageListResolution read GetResolutionForControl; property ResolutionForControl[AImageWidth: Integer; AControl: TControl]: TScaledImageListResolution
read GetResolutionForControl;
end; end;
TDragImageList = class; TDragImageList = class;