mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:38:19 +02:00
AnchorDocking: Add splitter resize style option, merge request !447
This commit is contained in:
parent
dfe9bc5e3e
commit
33acfcdae4
components/anchordocking
@ -118,6 +118,18 @@ uses
|
||||
{$IFDEF DebugDisableAutoSizing}
|
||||
const ADAutoSizingReason = 'TAnchorDockMaster Delayed';
|
||||
{$ENDIF}
|
||||
const
|
||||
crsLine='rsLine';
|
||||
crsNone='rsNone';
|
||||
crsPattern='rsPattern';
|
||||
crsUpdate='rsUpdate';
|
||||
ResizeStyle2Str : array [TResizeStyle] of String =
|
||||
(
|
||||
crsLine,
|
||||
crsNone,
|
||||
crsPattern,
|
||||
crsUpdate
|
||||
);
|
||||
|
||||
type
|
||||
TAnchorDockHostSite = class;
|
||||
@ -518,6 +530,7 @@ type
|
||||
FShowHeader: boolean;
|
||||
FShowHeaderCaption: boolean;
|
||||
FSplitterWidth: integer;
|
||||
FSplitterResizeStyle: TResizeStyle;
|
||||
FDockSitesCanBeMinimized: boolean;
|
||||
FFlatHeadersButtons: boolean;
|
||||
procedure SetAllowDragging(AValue: boolean);
|
||||
@ -538,6 +551,7 @@ type
|
||||
procedure SetShowHeader(AValue: boolean);
|
||||
procedure SetShowHeaderCaption(AValue: boolean);
|
||||
procedure SetSplitterWidth(AValue: integer);
|
||||
procedure SetSplitterResizeStyle(AValue: TResizeStyle);
|
||||
procedure SetHeaderFlatten(AValue: boolean);
|
||||
procedure SetHeaderFilled(AValue: boolean);
|
||||
procedure SetHeaderHighlightFocused(AValue: boolean);
|
||||
@ -554,6 +568,7 @@ type
|
||||
property HeaderAlignLeft: integer read FHeaderAlignLeft write SetHeaderAlignLeft;
|
||||
property HeaderHint: string read FHeaderHint write SetHeaderHint;
|
||||
property SplitterWidth: integer read FSplitterWidth write SetSplitterWidth;
|
||||
property SplitterResizeStyle: TResizeStyle read FSplitterResizeStyle write SetSplitterResizeStyle;
|
||||
property ScaleOnResize: boolean read FScaleOnResize write SetScaleOnResize;
|
||||
property ShowHeader: boolean read FShowHeader write SetShowHeader;
|
||||
property ShowHeaderCaption: boolean read FShowHeaderCaption write SetShowHeaderCaption;
|
||||
@ -650,6 +665,7 @@ type
|
||||
FSiteClass: TAnchorDockHostSiteClass;
|
||||
FSplitterClass: TAnchorDockSplitterClass;
|
||||
FSplitterWidth: integer;
|
||||
FSplitterResizeStyle: TResizeStyle;
|
||||
FMapMinimizedControls: TMapMinimizedControls; // minimized controls and previous parent
|
||||
fNeedSimplify: TFPList; // list of TControl
|
||||
fNeedFree: TFPList; // list of TControl
|
||||
@ -732,6 +748,7 @@ type
|
||||
procedure SetShowHeaderCaption(const AValue: boolean);
|
||||
procedure SetHideHeaderCaptionFloatingControl(const AValue: boolean);
|
||||
procedure SetSplitterWidth(const AValue: integer);
|
||||
procedure SetSplitterResizeStyle(const AValue: TResizeStyle);
|
||||
procedure OnIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure StartHideOverlappingTimer;
|
||||
procedure StopHideOverlappingTimer;
|
||||
@ -844,6 +861,7 @@ type
|
||||
property FlatHeadersButtons: boolean read FFlatHeadersButtons write SetFlatHeadersButtons default false;
|
||||
|
||||
property SplitterWidth: integer read FSplitterWidth write SetSplitterWidth default 4;
|
||||
property SplitterResizeStyle: TResizeStyle read FSplitterResizeStyle write SetSplitterResizeStyle default rsUpdate;
|
||||
property ScaleOnResize: boolean read FScaleOnResize write SetScaleOnResize default true; // scale children when resizing a site
|
||||
property AllowDragging: boolean read FAllowDragging write SetAllowDragging default true;
|
||||
property MultiLinePages: boolean read FMultiLinePages write SetMultiLinePages default false;
|
||||
@ -1524,6 +1542,13 @@ begin
|
||||
IncreaseChangeStamp;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockSettings.SetSplitterResizeStyle(AValue: TResizeStyle);
|
||||
begin
|
||||
if FSplitterResizeStyle=AValue then Exit;
|
||||
FSplitterResizeStyle:=AValue;
|
||||
IncreaseChangeStamp;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockSettings.SetDockSitesCanBeMinimized(AValue: boolean);
|
||||
begin
|
||||
if FDockSitesCanBeMinimized=AValue then Exit;
|
||||
@ -1565,6 +1590,19 @@ begin
|
||||
FShowHeader := Source.FShowHeader;
|
||||
FShowHeaderCaption := Source.FShowHeaderCaption;
|
||||
FSplitterWidth := Source.FSplitterWidth;
|
||||
FSplitterResizeStyle := Source.FSplitterResizeStyle;
|
||||
end;
|
||||
|
||||
function Str2ResizeStyle(ResizeStyleStr:string):TResizeStyle;
|
||||
begin
|
||||
if ResizeStyleStr=crsLine then
|
||||
result:=rsLine
|
||||
else if ResizeStyleStr=crsNone then
|
||||
result:=rsNone
|
||||
else if ResizeStyleStr=crsPattern then
|
||||
result:=rsPattern
|
||||
else
|
||||
result:=rsUpdate;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockSettings.IncreaseChangeStamp;
|
||||
@ -1597,6 +1635,7 @@ begin
|
||||
ShowHeader := Config.GetValue('ShowHeader',true);
|
||||
ShowHeaderCaption := Config.GetValue('ShowHeaderCaption',true);
|
||||
SplitterWidth := Config.GetValue('SplitterWidth',4);
|
||||
SplitterResizeStyle := Str2ResizeStyle(Config.GetValue('SplitterResizeStyle',crsUpdate));
|
||||
Config.UndoAppendBasePath;
|
||||
end;
|
||||
|
||||
@ -1624,6 +1663,7 @@ begin
|
||||
Config.SetDeleteValue(Path+'ShowHeader',ShowHeader,true);
|
||||
Config.SetDeleteValue(Path+'ShowHeaderCaption',ShowHeaderCaption,true);
|
||||
Config.SetDeleteValue(Path+'SplitterWidth',SplitterWidth,4);
|
||||
Config.SetDeleteValue(Path+'SplitterResizeStyle',ResizeStyle2Str[SplitterResizeStyle],crsUpdate);
|
||||
end;
|
||||
|
||||
procedure TAnchorDockSettings.SaveToConfig(Config: TConfigStorage);
|
||||
@ -1651,6 +1691,7 @@ begin
|
||||
Config.SetDeleteValue('ShowHeader',ShowHeader,true);
|
||||
Config.SetDeleteValue('ShowHeaderCaption',ShowHeaderCaption,true);
|
||||
Config.SetDeleteValue('SplitterWidth',SplitterWidth,4);
|
||||
Config.SetDeleteValue('SplitterResizeStyle',ResizeStyle2Str[SplitterResizeStyle],crsUpdate);
|
||||
Config.UndoAppendBasePath;
|
||||
end;
|
||||
|
||||
@ -1679,6 +1720,7 @@ begin
|
||||
and (ShowHeader=Settings.ShowHeader)
|
||||
and (ShowHeaderCaption=Settings.ShowHeaderCaption)
|
||||
and (SplitterWidth=Settings.SplitterWidth)
|
||||
and (SplitterResizeStyle=Settings.SplitterResizeStyle)
|
||||
;
|
||||
end;
|
||||
|
||||
@ -1707,6 +1749,7 @@ begin
|
||||
ShowHeader := Config.GetValue(Path+'ShowHeader',true);
|
||||
ShowHeaderCaption := Config.GetValue(Path+'ShowHeaderCaption',true);
|
||||
SplitterWidth := Config.GetValue(Path+'SplitterWidth',4);
|
||||
SplitterResizeStyle := Str2ResizeStyle(Config.GetValue(Path+'SplitterResizeStyle',crsUpdate));
|
||||
end;
|
||||
|
||||
{ TStyleOfForm }
|
||||
@ -2772,6 +2815,21 @@ begin
|
||||
OptionsChanged;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockMaster.SetSplitterResizeStyle(const AValue: TResizeStyle);
|
||||
var
|
||||
i: Integer;
|
||||
Splitter: TAnchorDockSplitter;
|
||||
begin
|
||||
if AValue=SplitterResizeStyle then exit;
|
||||
FSplitterResizeStyle:=AValue;
|
||||
for i:=0 to ComponentCount-1 do begin
|
||||
Splitter:=TAnchorDockSplitter(Components[i]);
|
||||
if not (Splitter is TAnchorDockSplitter) then continue;
|
||||
Splitter.ResizeStyle:=AValue;
|
||||
end;
|
||||
OptionsChanged;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockMaster.StartHideOverlappingTimer;
|
||||
begin
|
||||
if not DockTimer.Enabled then begin
|
||||
@ -3234,6 +3292,7 @@ begin
|
||||
FShowHeader:=true;
|
||||
FShowHeaderCaption:=true;
|
||||
FHideHeaderCaptionFloatingControl:=true;
|
||||
FSplitterResizeStyle:=rsUpdate;
|
||||
FSplitterWidth:=4;
|
||||
FScaleOnResize:=true;
|
||||
FMapMinimizedControls:=TMapMinimizedControls.Create;
|
||||
@ -3957,6 +4016,7 @@ begin
|
||||
ShowHeader := Settings.ShowHeader;
|
||||
ShowHeaderCaption := Settings.ShowHeaderCaption;
|
||||
SplitterWidth := Settings.SplitterWidth;
|
||||
SplitterResizeStyle := Settings.SplitterResizeStyle;
|
||||
end;
|
||||
|
||||
procedure TAnchorDockMaster.SaveSettings(Settings: TAnchorDockSettings);
|
||||
@ -3983,6 +4043,7 @@ begin
|
||||
Settings.ShowHeader := ShowHeader;
|
||||
Settings.ShowHeaderCaption := ShowHeaderCaption;
|
||||
Settings.SplitterWidth := SplitterWidth;
|
||||
Settings.SplitterResizeStyle := SplitterResizeStyle;
|
||||
end;
|
||||
|
||||
function TAnchorDockMaster.SettingsAreEqual(Settings: TAnchorDockSettings
|
||||
@ -4349,6 +4410,7 @@ var
|
||||
NewName: String;
|
||||
begin
|
||||
Result:=SplitterClass.Create(Self);
|
||||
Result.ResizeStyle:=SplitterResizeStyle;
|
||||
i:=0;
|
||||
repeat
|
||||
inc(i);
|
||||
|
@ -1,25 +1,25 @@
|
||||
object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
Left = 0
|
||||
Height = 842
|
||||
Height = 632
|
||||
Top = 0
|
||||
Width = 636
|
||||
ClientHeight = 842
|
||||
ClientWidth = 636
|
||||
DesignTimePPI = 144
|
||||
Width = 477
|
||||
ClientHeight = 632
|
||||
ClientWidth = 477
|
||||
DesignTimePPI = 108
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
DesignLeft = 517
|
||||
DesignTop = 239
|
||||
DesignLeft = -9
|
||||
DesignTop = 482
|
||||
object DragThresholdLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = DragThresholdSpinEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 15
|
||||
Height = 25
|
||||
Top = 13
|
||||
Width = 158
|
||||
BorderSpacing.Left = 15
|
||||
BorderSpacing.Top = 15
|
||||
Left = 11
|
||||
Height = 18
|
||||
Top = 12
|
||||
Width = 137
|
||||
BorderSpacing.Left = 11
|
||||
BorderSpacing.Top = 11
|
||||
Caption = 'DragThresholdLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -30,15 +30,17 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 70
|
||||
Top = 38
|
||||
Width = 606
|
||||
Left = 11
|
||||
Height = 52
|
||||
Top = 30
|
||||
Width = 455
|
||||
Max = 20
|
||||
OnChange = DragThresholdTrackBarChange
|
||||
Position = 0
|
||||
OnChange = DragThresholdTrackBarChange
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Right = 15
|
||||
BorderSpacing.Right = 11
|
||||
Color = 3487029
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -49,12 +51,12 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
Left = 182
|
||||
Height = 33
|
||||
Top = 9
|
||||
Width = 90
|
||||
BorderSpacing.Left = 9
|
||||
BorderSpacing.Top = 9
|
||||
Left = 155
|
||||
Height = 28
|
||||
Top = 7
|
||||
Width = 68
|
||||
BorderSpacing.Left = 7
|
||||
BorderSpacing.Top = 7
|
||||
MaxValue = 20
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
@ -64,11 +66,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = DragThresholdTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 25
|
||||
Top = 123
|
||||
Width = 145
|
||||
BorderSpacing.Top = 15
|
||||
Left = 11
|
||||
Height = 18
|
||||
Top = 93
|
||||
Width = 125
|
||||
BorderSpacing.Top = 11
|
||||
Caption = 'SplitterWidthLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -79,14 +81,16 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DragThresholdTrackBar
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 70
|
||||
Top = 148
|
||||
Width = 606
|
||||
Left = 11
|
||||
Height = 52
|
||||
Top = 111
|
||||
Width = 455
|
||||
Min = 1
|
||||
OnChange = SplitterWidthTrackBarChange
|
||||
Position = 1
|
||||
OnChange = SplitterWidthTrackBarChange
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Color = 3487029
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -94,13 +98,12 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
end
|
||||
object ScaleOnResizeCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = SplitterWidthTrackBar
|
||||
AnchorSideTop.Control = SplitterResizeStyleComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 29
|
||||
Top = 224
|
||||
Width = 214
|
||||
BorderSpacing.Top = 6
|
||||
Left = 11
|
||||
Height = 21
|
||||
Top = 193
|
||||
Width = 186
|
||||
Caption = 'ScaleOnResizeCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -111,26 +114,26 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = ScaleOnResizeCheckBox
|
||||
AnchorSideTop.Control = ScaleOnResizeCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 29
|
||||
Top = 253
|
||||
Width = 202
|
||||
Left = 11
|
||||
Height = 21
|
||||
Top = 214
|
||||
Width = 175
|
||||
Caption = 'ShowHeaderCheckBox'
|
||||
OnChange = ShowHeaderCheckBoxChange
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
OnChange = ShowHeaderCheckBoxChange
|
||||
end
|
||||
object ShowHeaderCaptionCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = ScaleOnResizeCheckBox
|
||||
AnchorSideTop.Control = ShowHeaderCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 282
|
||||
Width = 264
|
||||
BorderSpacing.Left = 22
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 235
|
||||
Width = 228
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'ShowHeaderCaptionCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -141,10 +144,10 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = ShowHeaderCaptionCheckBox
|
||||
AnchorSideTop.Control = ShowHeaderCaptionCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 311
|
||||
Width = 347
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 256
|
||||
Width = 299
|
||||
Caption = 'HideHeaderCaptionForFloatingCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -158,28 +161,28 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 174
|
||||
Height = 33
|
||||
Top = 398
|
||||
Width = 447
|
||||
Left = 147
|
||||
Height = 30
|
||||
Top = 319
|
||||
Width = 319
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 9
|
||||
BorderSpacing.Right = 15
|
||||
ItemHeight = 25
|
||||
OnDrawItem = HeaderStyleComboBoxDrawItem
|
||||
BorderSpacing.Left = 7
|
||||
BorderSpacing.Right = 11
|
||||
ItemHeight = 0
|
||||
ParentFont = False
|
||||
Style = csDropDownList
|
||||
TabOrder = 10
|
||||
OnDrawItem = HeaderStyleComboBoxDrawItem
|
||||
end
|
||||
object HeaderStyleLabel: TLabel
|
||||
AnchorSideLeft.Control = ShowHeaderCheckBox
|
||||
AnchorSideTop.Control = HeaderStyleComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 30
|
||||
Height = 25
|
||||
Top = 402
|
||||
Width = 135
|
||||
BorderSpacing.Left = 15
|
||||
Left = 22
|
||||
Height = 18
|
||||
Top = 325
|
||||
Width = 118
|
||||
BorderSpacing.Left = 11
|
||||
Caption = 'HeaderStyleLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -188,10 +191,10 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = HideHeaderCaptionForFloatingCheckBox
|
||||
AnchorSideTop.Control = HideHeaderCaptionForFloatingCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 340
|
||||
Width = 219
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 277
|
||||
Width = 191
|
||||
Caption = 'FlattenHeadersCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -202,10 +205,10 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = FlattenHeadersCheckBox
|
||||
AnchorSideTop.Control = FlattenHeadersCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 369
|
||||
Width = 207
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 298
|
||||
Width = 181
|
||||
Caption = 'FilledHeadersCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -216,10 +219,10 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = FilledHeadersCheckBox
|
||||
AnchorSideTop.Control = HeaderStyleComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 431
|
||||
Width = 240
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 349
|
||||
Width = 206
|
||||
Caption = 'HighlightFocusedCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -231,11 +234,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SplitterWidthLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 169
|
||||
Height = 33
|
||||
Top = 119
|
||||
Width = 90
|
||||
BorderSpacing.Left = 9
|
||||
Left = 143
|
||||
Height = 28
|
||||
Top = 88
|
||||
Width = 68
|
||||
BorderSpacing.Left = 7
|
||||
MaxValue = 10
|
||||
MinValue = 1
|
||||
ParentFont = False
|
||||
@ -247,11 +250,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = FlatHeadersButtons
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 25
|
||||
Top = 533
|
||||
Width = 168
|
||||
BorderSpacing.Top = 15
|
||||
Left = 11
|
||||
Height = 18
|
||||
Top = 423
|
||||
Width = 145
|
||||
BorderSpacing.Top = 11
|
||||
Caption = 'HeaderAlignTopLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -262,17 +265,19 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DragThresholdTrackBar
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 70
|
||||
Top = 558
|
||||
Width = 606
|
||||
Left = 11
|
||||
Height = 52
|
||||
Top = 441
|
||||
Width = 455
|
||||
Frequency = 10
|
||||
Max = 150
|
||||
OnChange = HeaderAlignTopTrackBarChange
|
||||
PageSize = 10
|
||||
Position = 0
|
||||
OnChange = HeaderAlignTopTrackBarChange
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 15
|
||||
BorderSpacing.Left = 11
|
||||
Color = 3487029
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -283,11 +288,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = HeaderAlignTopLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 192
|
||||
Height = 33
|
||||
Top = 529
|
||||
Width = 90
|
||||
BorderSpacing.Left = 9
|
||||
Left = 163
|
||||
Height = 28
|
||||
Top = 418
|
||||
Width = 68
|
||||
BorderSpacing.Left = 7
|
||||
MaxValue = 150
|
||||
ParentFont = False
|
||||
TabOrder = 12
|
||||
@ -297,11 +302,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = HeaderAlignTopTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 25
|
||||
Top = 643
|
||||
Width = 168
|
||||
BorderSpacing.Top = 15
|
||||
Left = 11
|
||||
Height = 18
|
||||
Top = 504
|
||||
Width = 145
|
||||
BorderSpacing.Top = 11
|
||||
Caption = 'HeaderAlignLeftLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -312,17 +317,19 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DragThresholdTrackBar
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 70
|
||||
Top = 668
|
||||
Width = 606
|
||||
Left = 11
|
||||
Height = 52
|
||||
Top = 522
|
||||
Width = 455
|
||||
Frequency = 10
|
||||
Max = 200
|
||||
OnChange = HeaderAlignLeftTrackBarChange
|
||||
PageSize = 10
|
||||
Position = 0
|
||||
OnChange = HeaderAlignLeftTrackBarChange
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 15
|
||||
BorderSpacing.Left = 11
|
||||
Color = 3487029
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -333,11 +340,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = HeaderAlignLeftLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 192
|
||||
Height = 33
|
||||
Top = 639
|
||||
Width = 90
|
||||
BorderSpacing.Left = 9
|
||||
Left = 163
|
||||
Height = 28
|
||||
Top = 499
|
||||
Width = 68
|
||||
BorderSpacing.Left = 7
|
||||
MaxValue = 200
|
||||
ParentFont = False
|
||||
TabOrder = 14
|
||||
@ -347,10 +354,10 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = FilledHeadersCheckBox
|
||||
AnchorSideTop.Control = HighlightFocusedCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 460
|
||||
Width = 234
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 370
|
||||
Width = 202
|
||||
Caption = 'DockSitesCanBeMinimized'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -361,11 +368,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = ShowHeaderCheckBox
|
||||
AnchorSideTop.Control = HeaderAlignLeftTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 29
|
||||
Top = 744
|
||||
Width = 219
|
||||
BorderSpacing.Top = 6
|
||||
Left = 11
|
||||
Height = 21
|
||||
Top = 578
|
||||
Width = 191
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'MultiLinePagesCheckBox'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -376,11 +383,11 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = MultiLinePagesCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 15
|
||||
Height = 29
|
||||
Top = 779
|
||||
Width = 218
|
||||
BorderSpacing.Top = 6
|
||||
Left = 11
|
||||
Height = 21
|
||||
Top = 603
|
||||
Width = 184
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'FloatingWindowsOnTop'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
@ -391,14 +398,47 @@ object AnchorDockOptionsFrame: TAnchorDockOptionsFrame
|
||||
AnchorSideLeft.Control = FilledHeadersCheckBox
|
||||
AnchorSideTop.Control = DockSitesCanBeMinimized
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 37
|
||||
Height = 29
|
||||
Top = 489
|
||||
Width = 179
|
||||
Left = 27
|
||||
Height = 21
|
||||
Top = 391
|
||||
Width = 157
|
||||
Caption = 'FlatHeadersButtons'
|
||||
ParentFont = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 19
|
||||
end
|
||||
object SplitterResizeStyleLabel: TLabel
|
||||
AnchorSideLeft.Control = DragThresholdLabel
|
||||
AnchorSideTop.Control = SplitterResizeStyleComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 11
|
||||
Height = 18
|
||||
Top = 169
|
||||
Width = 160
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'SplitterResizeStyleLabel'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object SplitterResizeStyleComboBox: TComboBox
|
||||
AnchorSideLeft.Control = SplitterResizeStyleLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SplitterWidthTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 30
|
||||
Top = 163
|
||||
Width = 288
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 7
|
||||
BorderSpacing.Right = 11
|
||||
ItemHeight = 0
|
||||
ParentFont = False
|
||||
Style = csDropDownList
|
||||
TabOrder = 20
|
||||
OnDrawItem = HeaderStyleComboBoxDrawItem
|
||||
end
|
||||
end
|
||||
|
@ -35,6 +35,7 @@ type
|
||||
HeaderAlignTopSpinEdit: TSpinEdit;
|
||||
HeaderAlignTopTrackBar: TTrackBar;
|
||||
HeaderStyleComboBox: TComboBox;
|
||||
SplitterResizeStyleComboBox: TComboBox;
|
||||
HeaderStyleLabel: TLabel;
|
||||
HideHeaderCaptionForFloatingCheckBox: TCheckBox;
|
||||
HighlightFocusedCheckBox: TCheckBox;
|
||||
@ -45,6 +46,7 @@ type
|
||||
ShowHeaderCaptionCheckBox: TCheckBox;
|
||||
ShowHeaderCheckBox: TCheckBox;
|
||||
SplitterWidthLabel: TLabel;
|
||||
SplitterResizeStyleLabel: TLabel;
|
||||
SplitterWidthSpinEdit: TSpinEdit;
|
||||
SplitterWidthTrackBar: TTrackBar;
|
||||
procedure HeaderStyleComboBoxDrawItem({%H-}Control: TWinControl; Index: Integer;
|
||||
@ -201,6 +203,8 @@ begin
|
||||
SplitterWidthLabel.AnchorVerticalCenterTo(SplitterWidthSpinEdit);
|
||||
UpdateSplitterWidthLabel;
|
||||
|
||||
SplitterResizeStyleComboBox.AnchorToNeighbour(akTop,6,SplitterWidthSpinEdit);
|
||||
|
||||
HeaderAlignTopSpinEdit.Visible:=true;
|
||||
HeaderAlignTopTrackBar.Visible:=false;
|
||||
HeaderAlignTopSpinEdit.AnchorToNeighbour(akTop,6,FlatHeadersButtons);
|
||||
@ -363,12 +367,14 @@ begin
|
||||
TheSettings.ScaleOnResize:=ScaleOnResizeCheckBox.Checked;
|
||||
TheSettings.ShowHeader:=ShowHeaderCheckBox.Checked;
|
||||
TheSettings.ShowHeaderCaption:=ShowHeaderCaptionCheckBox.Checked;
|
||||
TheSettings.SplitterResizeStyle:=TResizeStyle(SplitterResizeStyleComboBox.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TAnchorDockOptionsFrame.LoadFromSettings(
|
||||
TheSettings: TAnchorDockSettings);
|
||||
var
|
||||
StyleIndex,CurrentStyleIndex: Integer;
|
||||
ResizeStyle:TResizeStyle;
|
||||
sl: TStringList;
|
||||
begin
|
||||
DragThresholdTrackBar.Hint:=
|
||||
@ -394,6 +400,15 @@ begin
|
||||
SplitterWidthSpinEdit.Value:=TheSettings.SplitterWidth;
|
||||
UpdateSplitterWidthLabel;
|
||||
|
||||
SplitterResizeStyleLabel.Caption:=adrsSplitterResizeStyle;
|
||||
|
||||
SplitterResizeStyleComboBox.Clear;
|
||||
for ResizeStyle:=low(ResizeStyle2Str) to high(ResizeStyle2Str) do begin
|
||||
SplitterResizeStyleComboBox.AddItem(ResizeStyle2Str[ResizeStyle],nil);
|
||||
if DockMaster.SplitterResizeStyle=ResizeStyle then
|
||||
SplitterResizeStyleComboBox.ItemIndex:=ord(ResizeStyle);
|
||||
end;
|
||||
|
||||
ScaleOnResizeCheckBox.Caption:=adrsScaleOnResize;
|
||||
ScaleOnResizeCheckBox.Hint:=adrsScaleSubSitesWhenASiteIsResized;
|
||||
ScaleOnResizeCheckBox.Checked:=TheSettings.ScaleOnResize;
|
||||
|
@ -55,6 +55,7 @@ resourcestring
|
||||
adrsMoveHeaderToLeftWhenWidthHeight100HeaderAlignLeft = 'Move header to '
|
||||
+'left when (Width/Height)*100>=HeaderAlignLeft';
|
||||
adrsSplitterWidth = 'Splitter width';
|
||||
adrsSplitterResizeStyle = 'Splitter resize style:';
|
||||
adrsSplitterThickness = 'Splitter thickness';
|
||||
adrsScaleOnResize = 'Scale on resize';
|
||||
adrsScaleSubSitesWhenASiteIsResized ='Scale sub sites when a site is resized';
|
||||
|
Loading…
Reference in New Issue
Block a user