Images: A set up updated icons focussing on more uniform visual style (by Roland Hahn)
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 550 B |
@ -9,26 +9,26 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
ClientWidth = 436
|
||||
Constraints.MinHeight = 180
|
||||
Constraints.MinWidth = 200
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '3.99.0.0'
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.9.0.0'
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 6
|
||||
Height = 336
|
||||
Height = 337
|
||||
Top = 6
|
||||
Width = 424
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Picture'
|
||||
ClientHeight = 309
|
||||
ClientHeight = 317
|
||||
ClientWidth = 420
|
||||
TabOrder = 0
|
||||
object ScrollBox: TScrollBox
|
||||
AnchorSideRight.Control = GroupBox1
|
||||
AnchorSideBottom.Control = GroupBox1
|
||||
Left = 6
|
||||
Height = 297
|
||||
Height = 305
|
||||
Top = 6
|
||||
Width = 322
|
||||
HorzScrollBar.Page = 100
|
||||
@ -37,7 +37,7 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
VertScrollBar.Tracking = True
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
ClientHeight = 293
|
||||
ClientHeight = 301
|
||||
ClientWidth = 318
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -55,12 +55,12 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
end
|
||||
object LoadSaveBtnPanel: TPanel
|
||||
Left = 334
|
||||
Height = 309
|
||||
Height = 317
|
||||
Top = 0
|
||||
Width = 86
|
||||
Align = alRight
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 309
|
||||
ClientHeight = 317
|
||||
ClientWidth = 86
|
||||
TabOrder = 1
|
||||
object LoadButton: TButton
|
||||
@ -142,8 +142,8 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
end
|
||||
object OkCancelButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 348
|
||||
Height = 26
|
||||
Top = 349
|
||||
Width = 424
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
@ -158,51 +158,51 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
ShowBevel = False
|
||||
end
|
||||
object OpenDialog: TOpenPictureDialog
|
||||
left = 138
|
||||
top = 182
|
||||
Left = 138
|
||||
Top = 182
|
||||
end
|
||||
object SaveDialog: TSavePictureDialog
|
||||
left = 186
|
||||
top = 182
|
||||
Left = 186
|
||||
Top = 182
|
||||
end
|
||||
object ActionList: TActionList
|
||||
left = 355
|
||||
top = 244
|
||||
Left = 355
|
||||
Top = 244
|
||||
object CopyAction: TEditCopy
|
||||
Category = 'Edit'
|
||||
Caption = '&Copy'
|
||||
Hint = 'Copy'
|
||||
ShortCut = 16451
|
||||
OnExecute = CopyActionExecute
|
||||
OnUpdate = CopyActionUpdate
|
||||
ShortCut = 16451
|
||||
end
|
||||
object PasteAction: TEditPaste
|
||||
Category = 'Edit'
|
||||
Caption = '&Paste'
|
||||
Hint = 'Paste'
|
||||
ShortCut = 16470
|
||||
OnExecute = PasteActionExecute
|
||||
OnUpdate = PasteActionUpdate
|
||||
ShortCut = 16470
|
||||
end
|
||||
object FileOpenAction: TAction
|
||||
Category = 'File'
|
||||
Caption = 'Load'
|
||||
OnExecute = FileOpenActionExecute
|
||||
ShortCut = 16463
|
||||
OnExecute = FileOpenActionExecute
|
||||
end
|
||||
object FileSaveAction: TAction
|
||||
Category = 'File'
|
||||
Caption = 'Save'
|
||||
ShortCut = 16467
|
||||
OnExecute = FileSaveActionExecute
|
||||
OnUpdate = FileSaveActionUpdate
|
||||
ShortCut = 16467
|
||||
end
|
||||
object ClearAction: TEditDelete
|
||||
Category = 'Edit'
|
||||
Caption = 'Clear'
|
||||
Hint = 'Delete'
|
||||
OnExecute = ClearActionExecute
|
||||
ShortCut = 46
|
||||
OnExecute = ClearActionExecute
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -74,6 +74,8 @@ type
|
||||
property Graphic: TGraphic read GetGraphic write SetGraphic;
|
||||
end;
|
||||
|
||||
TGraphicPropertyEditorFormClass = class of TGraphicPropertyEditorForm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
@ -30,6 +30,8 @@ type
|
||||
TPixmap, TIcon, etc.). }
|
||||
|
||||
TGraphicPropertyEditor = class(TClassPropertyEditor)
|
||||
protected
|
||||
class function GetEditorFormClass: TGraphicPropertyEditorFormClass; virtual;
|
||||
public
|
||||
procedure Edit; override;
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
@ -175,7 +177,7 @@ var
|
||||
FreeGraphic: Boolean;
|
||||
begin
|
||||
AGraphic := TGraphic(GetObjectValue(TGraphic));
|
||||
TheDialog := TGraphicPropertyEditorForm.Create(nil);
|
||||
TheDialog := GetEditorFormClass.Create(nil);
|
||||
FreeGraphic:=false;
|
||||
try
|
||||
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
|
||||
@ -225,6 +227,12 @@ begin
|
||||
Result := [paDialog, paRevertable, paReadOnly];
|
||||
end;
|
||||
|
||||
class function TGraphicPropertyEditor.GetEditorFormClass: TGraphicPropertyEditorFormClass;
|
||||
begin
|
||||
Result := TGraphicPropertyEditorForm;
|
||||
end;
|
||||
|
||||
|
||||
{ TPicturePropertyEditor }
|
||||
|
||||
procedure TPicturePropertyEditor.Edit;
|
||||
@ -241,7 +249,7 @@ var
|
||||
Picture: TPicture;
|
||||
begin
|
||||
Picture := TPicture(GetObjectValue(TPicture));
|
||||
TheDialog := TGraphicPropertyEditorForm.Create(nil);
|
||||
TheDialog := GetEditorFormClass.Create(nil);
|
||||
try
|
||||
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
|
||||
if (Picture.Graphic <> nil) then
|
||||
@ -280,7 +288,7 @@ var
|
||||
ABitmap: TBitmap;
|
||||
begin
|
||||
ABitmap := TBitmap(GetObjectValue(TBitmap));
|
||||
TheDialog := TGraphicPropertyEditorForm.Create(nil);
|
||||
TheDialog := GetEditorFormClass.Create(nil);
|
||||
try
|
||||
TheDialog.CaptionDetail := GetComponent(0).GetNamePath + '.' + GetName();
|
||||
if not ABitmap.Empty then
|
||||
|
@ -109,21 +109,21 @@ type
|
||||
function GetGlyphInfo(const aItemIndex: Integer): TGlyphInfo;
|
||||
procedure RefreshItemHeight;
|
||||
procedure FreeGlyphInfos;
|
||||
procedure InternalAddImageToList(const Picture: TPicture; AddType: TAddType);
|
||||
procedure RecreatePreviewImages(const aForce: Boolean = False);
|
||||
procedure UpdatePreviewImage;
|
||||
procedure UpdateImagesGroupBoxWidth;
|
||||
procedure UpdateImagesGroupBoxWidthQueue({%H-}Data: PtrInt);
|
||||
class function ResolutionToString(const ARes: TCustomImageListResolution): string;
|
||||
procedure PasteFromClipboardAndAdd;
|
||||
protected
|
||||
procedure DoDestroy; override;
|
||||
procedure InternalAddImageToList(const Picture: TPicture; AddType: TAddType);
|
||||
procedure UpdatePreviewImage;
|
||||
public
|
||||
procedure LoadFromImageList(AImageList: TImageList);
|
||||
procedure SaveToImageList;
|
||||
|
||||
procedure AddImageToList(const FileName: String; AddType: TAddType);
|
||||
procedure AddSlicedImagesToList(const FileName: String);
|
||||
property Modified: Boolean read FModified write FModified;
|
||||
end;
|
||||
|
||||
//Editor call by Lazarus with 1 verbe only
|
||||
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 877 B After Width: | Height: | Size: 801 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 913 B |
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 797 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 860 B After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 920 B After Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 505 B |
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 753 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 712 B |
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 913 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 659 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 699 B |
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 1004 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 481 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 371 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 889 B After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 724 B |
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 957 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 759 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 848 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 768 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 783 B |