mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +02:00
made addfiletoapackage dialog more compact
git-svn-id: trunk@7385 -
This commit is contained in:
parent
d38b28736f
commit
83e05bbe9e
@ -673,9 +673,11 @@ begin
|
|||||||
ImgReader:=nil;
|
ImgReader:=nil;
|
||||||
NewSaveStream:=nil;
|
NewSaveStream:=nil;
|
||||||
if UseSize then begin
|
if UseSize then begin
|
||||||
|
// Use the given 'Size' parameter
|
||||||
StoreOriginal(Stream,Size);
|
StoreOriginal(Stream,Size);
|
||||||
SrcStream:=NewSaveStream;
|
SrcStream:=NewSaveStream;
|
||||||
end else begin
|
end else begin
|
||||||
|
|
||||||
FreeSaveStream;
|
FreeSaveStream;
|
||||||
SrcStream:=Stream;
|
SrcStream:=Stream;
|
||||||
end;
|
end;
|
||||||
@ -1006,6 +1008,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.99 2005/07/19 19:18:17 mattias
|
||||||
|
made addfiletoapackage dialog more compact
|
||||||
|
|
||||||
Revision 1.98 2005/07/18 09:29:11 mattias
|
Revision 1.98 2005/07/18 09:29:11 mattias
|
||||||
Added TProtableAnyMapGraphic and fixed loading .ico on BIG_ENDIAN systems from Colin Western
|
Added TProtableAnyMapGraphic and fixed loading .ico on BIG_ENDIAN systems from Colin Western
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ type
|
|||||||
public
|
public
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function GetCaption: string;
|
function GetCaption: string;
|
||||||
|
function GetParentControl: TWinControl;
|
||||||
property Splitter: TLazDockSplitter read FSplitter write FSplitter;
|
property Splitter: TLazDockSplitter read FSplitter write FSplitter;
|
||||||
property Pages: TLazDockPages read FPages write FPages;
|
property Pages: TLazDockPages read FPages write FPages;
|
||||||
property Page: TLazDockPage read FPage write FPage;
|
property Page: TLazDockPage read FPage write FPage;
|
||||||
@ -376,6 +377,7 @@ var
|
|||||||
NewParentZone: TDockZone;
|
NewParentZone: TDockZone;
|
||||||
OldParentZone: TDockZone;
|
OldParentZone: TDockZone;
|
||||||
NewBounds: TRect;
|
NewBounds: TRect;
|
||||||
|
ASibling: TDockZone;
|
||||||
begin
|
begin
|
||||||
if DropControl=nil then
|
if DropControl=nil then
|
||||||
DropControl:=DockSite;
|
DropControl:=DockSite;
|
||||||
@ -454,13 +456,6 @@ begin
|
|||||||
else
|
else
|
||||||
DropZone.Parent.AddAsLastChild(NewZone);
|
DropZone.Parent.AddAsLastChild(NewZone);
|
||||||
|
|
||||||
// resize control
|
|
||||||
if InsertAt in [alLeft,alRight] then begin
|
|
||||||
|
|
||||||
end else begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
// break anchors and resize DockSite
|
// break anchors and resize DockSite
|
||||||
BreakAnchors(RootZone);
|
BreakAnchors(RootZone);
|
||||||
NewBounds:=DockSite.BoundsRect;
|
NewBounds:=DockSite.BoundsRect;
|
||||||
@ -481,7 +476,19 @@ begin
|
|||||||
AControl.AnchorSide[akLeft].Control:=nil;
|
AControl.AnchorSide[akLeft].Control:=nil;
|
||||||
AControl.AnchorSide[akTop].Control:=nil;
|
AControl.AnchorSide[akTop].Control:=nil;
|
||||||
AControl.AutoSize:=false;
|
AControl.AutoSize:=false;
|
||||||
AControl.Parent:=DockSite;
|
// resize control
|
||||||
|
RaiseGDBException('TLazDockTree.InsertControl TODO resize control');
|
||||||
|
if NewOrientation in [doHorizontal,doVertical] then begin
|
||||||
|
ASibling:=NewZone.PrevSibling;
|
||||||
|
if ASibling=nil then ASibling:=NewZone.NextSibling;
|
||||||
|
if ASibling<>nil then begin
|
||||||
|
if NewOrientation=doHorizontal then
|
||||||
|
AControl.Height:=ASibling.Height
|
||||||
|
else
|
||||||
|
AControl.Width:=ASibling.Width;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
AControl.Parent:=NewZone.GetParentControl;
|
||||||
|
|
||||||
// Build dock layout (anchors, splitters, pages)
|
// Build dock layout (anchors, splitters, pages)
|
||||||
BuildDockLayout(RootZone as TLazDockZone);
|
BuildDockLayout(RootZone as TLazDockZone);
|
||||||
@ -629,5 +636,25 @@ begin
|
|||||||
Result:=IntToStr(GetIndex);
|
Result:=IntToStr(GetIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TLazDockZone.GetParentControl: TWinControl;
|
||||||
|
var
|
||||||
|
Zone: TDockZone;
|
||||||
|
begin
|
||||||
|
Result:=nil;
|
||||||
|
Zone:=Parent;
|
||||||
|
while Zone<>nil do begin
|
||||||
|
if Zone.Orientation=doPages then begin
|
||||||
|
Result:=(Zone as TLazDockZone).Pages;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if (Zone.Parent=nil) then begin
|
||||||
|
if Zone.ChildControl is TWinControl then
|
||||||
|
Result:=TWinControl(Zone.ChildControl);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
Zone:=Zone.Parent;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
|||||||
Top = 331
|
Top = 331
|
||||||
Width = 448
|
Width = 448
|
||||||
object FileGroupBox: TGroupBox
|
object FileGroupBox: TGroupBox
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.OnChange = nil
|
BorderSpacing.OnChange = nil
|
||||||
Caption = 'FileGroupBox'
|
Caption = 'FileGroupBox'
|
||||||
ClientHeight = 191
|
ClientHeight = 191
|
||||||
@ -31,6 +32,15 @@ object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
|||||||
Top = 40
|
Top = 40
|
||||||
Width = 404
|
Width = 404
|
||||||
end
|
end
|
||||||
|
object FileTypeRadioGroup: TRadioGroup
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
Caption = 'FileTypeRadioGroup'
|
||||||
|
ParentColor = True
|
||||||
|
Left = 12
|
||||||
|
Height = 72
|
||||||
|
Top = 113
|
||||||
|
Width = 404
|
||||||
|
end
|
||||||
object FileNameEdit: TEdit
|
object FileNameEdit: TEdit
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -56,16 +66,9 @@ object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
|||||||
Top = 88
|
Top = 88
|
||||||
Width = 404
|
Width = 404
|
||||||
end
|
end
|
||||||
object FileTypeRadioGroup: TRadioGroup
|
|
||||||
Caption = 'FileTypeRadioGroup'
|
|
||||||
ParentColor = True
|
|
||||||
Left = 12
|
|
||||||
Height = 72
|
|
||||||
Top = 112
|
|
||||||
Width = 404
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object PackagesGroupBox: TGroupBox
|
object PackagesGroupBox: TGroupBox
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
Caption = 'PackagesGroupBox'
|
Caption = 'PackagesGroupBox'
|
||||||
ClientHeight = 71
|
ClientHeight = 71
|
||||||
ClientWidth = 429
|
ClientWidth = 429
|
||||||
@ -95,6 +98,8 @@ object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object CancelButton: TButton
|
object CancelButton: TButton
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
Caption = 'CancelButton'
|
Caption = 'CancelButton'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@ -104,11 +109,17 @@ object AddFileToAPackageDialog: TAddFileToAPackageDialog
|
|||||||
Width = 75
|
Width = 75
|
||||||
end
|
end
|
||||||
object OkButton: TButton
|
object OkButton: TButton
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
AutoSize = True
|
||||||
BorderSpacing.OnChange = nil
|
BorderSpacing.OnChange = nil
|
||||||
|
BorderSpacing.Right = 10
|
||||||
Caption = 'OkButton'
|
Caption = 'OkButton'
|
||||||
OnClick = OkButtonClick
|
OnClick = OkButtonClick
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Left = 280
|
AnchorSideTop.Control = CancelButton
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = CancelButton
|
||||||
|
Left = 281
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 328
|
Top = 328
|
||||||
Width = 75
|
Width = 75
|
||||||
|
@ -6,29 +6,35 @@ LazarusResources.Add('TAddFileToAPackageDialog','FORMDATA',[
|
|||||||
+#7'OnClose'#7#25'AddFileToAPackageDlgClose'#13'PixelsPerInch'#2'p'#8'Positio'
|
+#7'OnClose'#7#25'AddFileToAPackageDlgClose'#13'PixelsPerInch'#2'p'#8'Positio'
|
||||||
+'n'#7#14'poScreenCenter'#8'ShowHint'#9#18'HorzScrollBar.Page'#3#191#1#18'Ver'
|
+'n'#7#14'poScreenCenter'#8'ShowHint'#9#18'HorzScrollBar.Page'#3#191#1#18'Ver'
|
||||||
+'tScrollBar.Page'#3'i'#1#4'Left'#3'='#2#6'Height'#3'j'#1#3'Top'#3'K'#1#5'Wid'
|
+'tScrollBar.Page'#3'i'#1#4'Left'#3'='#2#6'Height'#3'j'#1#3'Top'#3'K'#1#5'Wid'
|
||||||
+'th'#3#192#1#0#9'TGroupBox'#12'FileGroupBox'#22'BorderSpacing.OnChange'#13#7
|
+'th'#3#192#1#0#9'TGroupBox'#12'FileGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'
|
||||||
+'Caption'#6#12'FileGroupBox'#12'ClientHeight'#3#191#0#11'ClientWidth'#3#173#1
|
+#7'akRight'#8'akBottom'#0#22'BorderSpacing.OnChange'#13#7'Caption'#6#12'File'
|
||||||
+#11'ParentColor'#9#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#3#208#0#3'Top'#2#8#5
|
+'GroupBox'#12'ClientHeight'#3#191#0#11'ClientWidth'#3#173#1#11'ParentColor'#9
|
||||||
+'Width'#3#177#1#0#6'TLabel'#13'UnitNameLabel'#7'Caption'#6#13'UnitNameLabel'
|
+#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#3#208#0#3'Top'#2#8#5'Width'#3#177#1#0
|
||||||
+#5'Color'#7#6'clNone'#4'Left'#2#12#6'Height'#2#17#3'Top'#2'('#5'Width'#3#148
|
+#6'TLabel'#13'UnitNameLabel'#7'Caption'#6#13'UnitNameLabel'#5'Color'#7#6'clN'
|
||||||
+#1#0#0#5'TEdit'#12'FileNameEdit'#8'ReadOnly'#9#8'TabOrder'#2#0#4'Text'#6#12
|
+'one'#4'Left'#2#12#6'Height'#2#17#3'Top'#2'('#5'Width'#3#148#1#0#0#11'TRadio'
|
||||||
+'FileNameEdit'#4'Left'#2#12#6'Height'#2#23#3'Top'#2#8#5'Width'#3#148#1#0#0#5
|
+'Group'#18'FileTypeRadioGroup'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'
|
||||||
+'TEdit'#12'UnitNameEdit'#8'TabOrder'#2#1#4'Text'#6#12'UnitNameEdit'#4'Left'#2
|
+#0#7'Caption'#6#18'FileTypeRadioGroup'#11'ParentColor'#9#4'Left'#2#12#6'Heig'
|
||||||
+#12#6'Height'#2#23#3'Top'#2'8'#5'Width'#3#148#1#0#0#9'TCheckBox'#23'HasRegis'
|
+'ht'#2'H'#3'Top'#2'q'#5'Width'#3#148#1#0#0#5'TEdit'#12'FileNameEdit'#8'ReadO'
|
||||||
+'terProcCheckBox'#7'Caption'#6#23'HasRegisterProcCheckBox'#8'TabOrder'#2#2#4
|
+'nly'#9#8'TabOrder'#2#0#4'Text'#6#12'FileNameEdit'#4'Left'#2#12#6'Height'#2
|
||||||
+'Left'#2#14#6'Height'#2#23#3'Top'#2'X'#5'Width'#3#148#1#0#0#11'TRadioGroup'
|
+#23#3'Top'#2#8#5'Width'#3#148#1#0#0#5'TEdit'#12'UnitNameEdit'#8'TabOrder'#2#1
|
||||||
+#18'FileTypeRadioGroup'#7'Caption'#6#18'FileTypeRadioGroup'#11'ParentColor'#9
|
+#4'Text'#6#12'UnitNameEdit'#4'Left'#2#12#6'Height'#2#23#3'Top'#2'8'#5'Width'
|
||||||
+#4'Left'#2#12#6'Height'#2'H'#3'Top'#2'p'#5'Width'#3#148#1#0#0#0#9'TGroupBox'
|
+#3#148#1#0#0#9'TCheckBox'#23'HasRegisterProcCheckBox'#7'Caption'#6#23'HasReg'
|
||||||
+#16'PackagesGroupBox'#7'Caption'#6#16'PackagesGroupBox'#12'ClientHeight'#2'G'
|
+'isterProcCheckBox'#8'TabOrder'#2#2#4'Left'#2#14#6'Height'#2#23#3'Top'#2'X'#5
|
||||||
+#11'ClientWidth'#3#173#1#11'ParentColor'#9#8'TabOrder'#2#1#4'Left'#2#8#6'Hei'
|
+'Width'#3#148#1#0#0#0#9'TGroupBox'#16'PackagesGroupBox'#7'Anchors'#11#6'akLe'
|
||||||
+'ght'#2'X'#3'Top'#3#232#0#5'Width'#3#177#1#0#9'TComboBox'#16'PackagesComboBo'
|
+'ft'#7'akRight'#8'akBottom'#0#7'Caption'#6#16'PackagesGroupBox'#12'ClientHei'
|
||||||
+'x'#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Text'#6#16'PackagesComboBox'#4'Left'#2
|
+'ght'#2'G'#11'ClientWidth'#3#173#1#11'ParentColor'#9#8'TabOrder'#2#1#4'Left'
|
||||||
+#12#6'Height'#2#21#3'Top'#2#8#5'Width'#3#148#1#0#0#9'TCheckBox'#15'ShowAllCh'
|
+#2#8#6'Height'#2'X'#3'Top'#3#232#0#5'Width'#3#177#1#0#9'TComboBox'#16'Packag'
|
||||||
+'eckBox'#7'Caption'#6#15'ShowAllCheckBox'#7'OnClick'#7#20'ShowAllCheckBoxCli'
|
+'esComboBox'#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Text'#6#16'PackagesComboBox'
|
||||||
+'ck'#8'TabOrder'#2#1#4'Left'#2#12#6'Height'#2#23#3'Top'#2'('#5'Width'#3#148#1
|
+#4'Left'#2#12#6'Height'#2#21#3'Top'#2#8#5'Width'#3#148#1#0#0#9'TCheckBox'#15
|
||||||
+#0#0#0#7'TButton'#12'CancelButton'#7'Caption'#6#12'CancelButton'#11'ModalRes'
|
+'ShowAllCheckBox'#7'Caption'#6#15'ShowAllCheckBox'#7'OnClick'#7#20'ShowAllCh'
|
||||||
+'ult'#2#2#8'TabOrder'#2#2#4'Left'#3'n'#1#6'Height'#2#25#3'Top'#3'H'#1#5'Widt'
|
+'eckBoxClick'#8'TabOrder'#2#1#4'Left'#2#12#6'Height'#2#23#3'Top'#2'('#5'Widt'
|
||||||
+'h'#2'K'#0#0#7'TButton'#8'OkButton'#22'BorderSpacing.OnChange'#13#7'Caption'
|
+'h'#3#148#1#0#0#0#7'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akB'
|
||||||
+#6#8'OkButton'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#4'Left'#3#24#1
|
+'ottom'#0#8'AutoSize'#9#7'Caption'#6#12'CancelButton'#11'ModalResult'#2#2#8
|
||||||
+#6'Height'#2#25#3'Top'#3'H'#1#5'Width'#2'K'#0#0#0
|
+'TabOrder'#2#2#4'Left'#3'n'#1#6'Height'#2#25#3'Top'#3'H'#1#5'Width'#2'K'#0#0
|
||||||
|
+#7'TButton'#8'OkButton'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#22
|
||||||
|
+'BorderSpacing.OnChange'#13#19'BorderSpacing.Right'#2#10#7'Caption'#6#8'OkBu'
|
||||||
|
+'tton'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#21'AnchorSideTop.Contr'
|
||||||
|
+'ol'#7#12'CancelButton'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideR'
|
||||||
|
+'ight.Control'#7#12'CancelButton'#4'Left'#3#25#1#6'Height'#2#25#3'Top'#3'H'#1
|
||||||
|
+#5'Width'#2'K'#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -40,9 +40,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Forms, Controls, Buttons, ExtCtrls, StdCtrls,
|
Classes, SysUtils, LResources, Forms, Controls, Buttons, ExtCtrls, StdCtrls,
|
||||||
LazarusIDEStrConsts, Dialogs, {$IFNDEF VER1_0}AVL_Tree{$ELSE}OldAvLTree{$ENDIF},
|
LazarusIDEStrConsts, Dialogs, AVL_Tree, FileUtil, IDEProcs, IDEOptionDefs,
|
||||||
FileUtil, IDEProcs, IDEOptionDefs, ComponentReg, PackageDefs, PackageSystem,
|
ComponentReg, PackageDefs, PackageSystem;
|
||||||
Arrow;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -91,9 +90,6 @@ function ShowAddFileToAPackageDlg(const Filename, UnitName: string;
|
|||||||
HasRegisterProc: boolean): TModalResult;
|
HasRegisterProc: boolean): TModalResult;
|
||||||
|
|
||||||
|
|
||||||
var
|
|
||||||
AddFileToAPackageDialog: TAddFileToAPackageDialog;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
@ -312,7 +308,7 @@ begin
|
|||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
Caption:=lisAF2PAddFileToAPackage;
|
Caption:=lisAF2PAddFileToAPackage;
|
||||||
fPackages:=TAVLTree.Create(@CompareLazPackageID);
|
fPackages:=TAVLTree.Create(@CompareLazPackageID);
|
||||||
IDEDialogLayoutList.ApplyLayout(Self,448,362);
|
IDEDialogLayoutList.ApplyLayout(Self,448,280);
|
||||||
SetupComponents;
|
SetupComponents;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user