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