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

View File

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

View File

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