UPD: New panel color and custom columns configuration dialog (patch by Denis Bisson)

This commit is contained in:
Alexander Koblov 2015-06-06 10:00:12 +00:00
commit a3dd9a92b1
13 changed files with 4507 additions and 969 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,94 @@
TFRMOPTIONSCUSTOMCOLUMNS.LBLCONFIGCOLUMNS.CAPTION=Con&figure columns for file system:
TFRMOPTIONSCUSTOMCOLUMNS.CBBFILESYSTEM.TEXT=General
TFRMOPTIONSCUSTOMCOLUMNS.BTNNEWCOLUMNSSET.CAPTION=&New
TFRMOPTIONSCUSTOMCOLUMNS.BTNEDITCOLUMNSSET.CAPTION=&Edit
TFRMOPTIONSCUSTOMCOLUMNS.BTNDELCOLUMNSSET.CAPTION=&Delete
TFRMOPTIONSCUSTOMCOLUMNS.BTNCOPYCOLUMNSSET.CAPTION=C&opy
TFRMOPTIONSCUSTOMCOLUMNS.LBLCONFIGCOLUMNS.CAPTION=Con&figure columns view:
TFRMOPTIONSCUSTOMCOLUMNS.CBCONFIGCOLUMNS.TEXT=General
TFRMOPTIONSCUSTOMCOLUMNS.BTNSAVECONFIGCOLUMNS.CAPTION=Save
TFRMOPTIONSCUSTOMCOLUMNS.BTNRENAMECONFIGCOLUMNS.CAPTION=Rename
TFRMOPTIONSCUSTOMCOLUMNS.BTNSAVEASCONFIGCOLUMNS.CAPTION=Save as
TFRMOPTIONSCUSTOMCOLUMNS.BTNDELETECONFIGCOLUMNS.CAPTION=&Delete
TFRMOPTIONSCUSTOMCOLUMNS.BTNNEWCONFIG.CAPTION=New
TFRMOPTIONSCUSTOMCOLUMNS.CHKUSECUSTOMVIEW.CAPTION=Use custom font and color for this view
TFRMOPTIONSCUSTOMCOLUMNS.CBCURSORBORDER.CAPTION=Cursor border
TFRMOPTIONSCUSTOMCOLUMNS.BTNCURSORBORDERCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.CBUSEFRAMECURSOR.CAPTION=Use Frame Cursor
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORBORDER.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORBORDER.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFRAMECURSOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFRAMECURSOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNGOTOSETDEFAULT.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNGOTOSETDEFAULT.CAPTION=Go to set default
TFRMOPTIONSCUSTOMCOLUMNS.BTNPREV.CAPTION=Previous
TFRMOPTIONSCUSTOMCOLUMNS.BTNNEXT.CAPTION=Next
TFRMOPTIONSCUSTOMCOLUMNS.LBLFONTNAME.CAPTION=Font:
TFRMOPTIONSCUSTOMCOLUMNS.BTNFONT.CAPTION=...
TFRMOPTIONSCUSTOMCOLUMNS.LBLFONTSIZE.CAPTION=Size:
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFONT.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFONT.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLFONT.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLFONT.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.CBALLOWOVERCOLOR.CAPTION=Allow Overcolor
TFRMOPTIONSCUSTOMCOLUMNS.LBLFORECOLOR.CAPTION=Text Color:
TFRMOPTIONSCUSTOMCOLUMNS.LBLBACKCOLOR.CAPTION=BackGround:
TFRMOPTIONSCUSTOMCOLUMNS.LBLBACKCOLOR2.CAPTION=Background 2:
TFRMOPTIONSCUSTOMCOLUMNS.LBLMARKCOLOR.CAPTION=Mark Color:
TFRMOPTIONSCUSTOMCOLUMNS.BTNFORECOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNBACKCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNBACKCOLOR2.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNMARKCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETMARKCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETMARKCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETBACKCOLOR2.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETBACKCOLOR2.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETBACKCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETBACKCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFORECOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETFORECOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLFORECOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLFORECOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLBACKCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLBACKCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLBACKCOLOR2.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLBACKCOLOR2.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLMARKCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLMARKCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.LBLINACTIVEMARKCOLOR.CAPTION=Inactive Mark Color:
TFRMOPTIONSCUSTOMCOLUMNS.LBLINACTIVECURSORCOLOR.CAPTION=Inactive Cursor Color:
TFRMOPTIONSCUSTOMCOLUMNS.LBLCURSORTEXT.CAPTION=Cursor Text:
TFRMOPTIONSCUSTOMCOLUMNS.LBLCURSORCOLOR.CAPTION=Cursor Color:
TFRMOPTIONSCUSTOMCOLUMNS.BTNINACTIVEMARKCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNINACTIVECURSORCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNCURSORTEXT.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNCURSORCOLOR.CAPTION=>>
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETINACTIVECURSORCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETINACTIVECURSORCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORTEXT.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORTEXT.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETCURSORCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLCURSORCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLCURSORCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLCURSORTEXT.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLCURSORTEXT.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLINACTIVECURSORCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLINACTIVECURSORCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLINACTIVEMARKCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLINACTIVEMARKCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETINACTIVEMARKCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETINACTIVEMARKCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.CBUSEINVERTEDSELECTION.CAPTION=Use Inverted Selection
TFRMOPTIONSCUSTOMCOLUMNS.CBUSEINACTIVESELCOLOR.CAPTION=Use Inactive Selection Color
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLUSEINVERTEDSELECTION.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLUSEINVERTEDSELECTION.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLUSEINACTIVESELCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLUSEINACTIVESELCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLALLOWOVERCOLOR.HINT=Apply modification to all columns
TFRMOPTIONSCUSTOMCOLUMNS.BTNALLALLOWOVERCOLOR.CAPTION=All
TFRMOPTIONSCUSTOMCOLUMNS.LBLWORKINGCOLUMN.CAPTION=Settings for column:
TFRMOPTIONSCUSTOMCOLUMNS.LBLCURRENTCOLUMN.CAPTION=[Current Column Name]
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETALLOWOVERCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETALLOWOVERCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETUSEINVERTEDSELECTION.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETUSEINVERTEDSELECTION.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETUSEINACTIVESELCOLOR.HINT=Reset to default
TFRMOPTIONSCUSTOMCOLUMNS.BTNRESETUSEINACTIVESELCOLOR.CAPTION=R
TFRMOPTIONSCUSTOMCOLUMNS.CBAPPLYCHANGEFORALLCOLUMNS.CAPTION=When clicking to change something, change for all columns
TFRMOPTIONSCUSTOMCOLUMNS.LBLPREVIEWTOP.CAPTION=Below is a preview. You may move cursor and select files to get immediately an actual look and feel of the various settings.
TFRMOPTIONSCUSTOMCOLUMNS.MIADDCOLUMN.CAPTION=Add column

File diff suppressed because it is too large Load diff

View file

@ -4,15 +4,15 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
ChildSizing.LeftRightSpacing = 6
ClientHeight = 602
ClientWidth = 734
DesignLeft = 360
DesignTop = 62
DesignLeft = 397
DesignTop = 178
object gbUserInterface: TGroupBox[0]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = gbExecutingOperations
AnchorSideRight.Side = asrBottom
Left = 6
Height = 301
Height = 272
Top = 0
Width = 722
Anchors = [akTop, akLeft, akRight]
@ -24,7 +24,7 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
ChildSizing.VerticalSpacing = 4
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 284
ClientHeight = 254
ClientWidth = 718
TabOrder = 0
object lblProgressKind: TLabel
@ -33,8 +33,8 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Side = asrCenter
Left = 10
Height = 15
Top = 17
Width = 237
Top = 14
Width = 190
BorderSpacing.Bottom = 10
Caption = 'Show operations progress &initially in'
FocusControl = cbProgressKind
@ -46,13 +46,12 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = gbUserInterface
AnchorSideRight.Control = gbUserInterface
AnchorSideRight.Side = asrBottom
Left = 251
Height = 29
Left = 204
Height = 23
Top = 10
Width = 457
Width = 504
Anchors = [akTop, akLeft, akRight]
ItemHeight = 0
OnChange = GenericSomethingChanged
ItemHeight = 15
Style = csDropDownList
TabOrder = 0
end
@ -61,11 +60,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbProgressKind
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 43
Width = 144
Height = 19
Top = 37
Width = 118
Caption = 'D&rop readonly flag'
OnChange = GenericSomethingChanged
TabOrder = 1
end
object cbRenameSelOnlyName: TCheckBox
@ -73,11 +71,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbDropReadOnlyFlag
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 69
Width = 355
Height = 19
Top = 60
Width = 286
Caption = 'Select &file name without extension when renaming'
OnChange = GenericSomethingChanged
TabOrder = 2
end
object cbShowCopyTabSelectPanel: TCheckBox
@ -85,11 +82,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbRenameSelOnlyName
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 95
Width = 303
Height = 19
Top = 83
Width = 247
Caption = 'Sho&w tab select panel in copy/move dialog'
OnChange = GenericSomethingChanged
TabOrder = 3
end
object cbDeleteToTrash: TCheckBox
@ -97,9 +93,9 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbShowCopyTabSelectPanel
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 121
Width = 368
Height = 19
Top = 106
Width = 289
Caption = 'Dele&te to recycle bin (Shift key reverses this setting)'
OnChange = cbDeleteToTrashChange
TabOrder = 4
@ -109,9 +105,9 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = bvlConfirmations
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 174
Width = 123
Height = 19
Top = 156
Width = 102
Caption = 'Cop&y operation'
TabOrder = 5
end
@ -120,11 +116,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbCopyConfirmation
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 200
Width = 125
Height = 19
Top = 179
Width = 104
Caption = '&Move operation'
OnChange = GenericSomethingChanged
TabOrder = 6
end
object cbDeleteConfirmation: TCheckBox
@ -132,11 +127,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbMoveConfirmation
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 226
Width = 133
Height = 19
Top = 202
Width = 107
Caption = '&Delete operation'
OnChange = GenericSomethingChanged
TabOrder = 7
end
object cbDeleteToTrashConfirmation: TCheckBox
@ -144,11 +138,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbDeleteConfirmation
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 252
Width = 187
Height = 19
Top = 225
Width = 150
Caption = 'D&elete to trash operation'
OnChange = GenericSomethingChanged
TabOrder = 8
end
object bvlConfirmations: TDividerBevel
@ -159,7 +152,7 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideRight.Side = asrBottom
Left = 10
Height = 15
Top = 155
Top = 137
Width = 698
Caption = 'Show confirmation window for:'
Anchors = [akTop, akLeft, akRight]
@ -174,8 +167,8 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 191
Top = 307
Height = 180
Top = 278
Width = 722
Anchors = [akTop, akLeft, akRight]
AutoSize = True
@ -187,7 +180,7 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
ChildSizing.VerticalSpacing = 4
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 174
ClientHeight = 162
ClientWidth = 718
TabOrder = 1
object lblBufferSize: TLabel
@ -196,8 +189,8 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Side = asrCenter
Left = 10
Height = 15
Top = 15
Width = 240
Top = 14
Width = 191
BorderSpacing.Bottom = 10
Caption = '&Buffer size for file operations (in KB):'
FocusControl = edtBufferSize
@ -208,11 +201,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = gbExecutingOperations
AnchorSideBottom.Side = asrCenter
Left = 254
Height = 25
Left = 205
Height = 23
Top = 10
Width = 80
OnChange = GenericSomethingChanged
TabOrder = 0
end
object lblWipePassNumber: TLabel
@ -222,8 +214,8 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideBottom.Side = asrBottom
Left = 10
Height = 15
Top = 44
Width = 157
Top = 41
Width = 126
BorderSpacing.Bottom = 10
Caption = '&Number of wipe passes:'
FocusControl = seWipePassNumber
@ -234,11 +226,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edtBufferSize
AnchorSideTop.Side = asrBottom
Left = 171
Height = 25
Top = 39
Left = 140
Height = 23
Top = 37
Width = 50
OnChange = GenericSomethingChanged
TabOrder = 1
end
object cbProcessComments: TCheckBox
@ -246,9 +237,9 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = seWipePassNumber
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 68
Width = 259
Height = 19
Top = 64
Width = 211
Caption = '&Process comments with files/folders'
TabOrder = 2
end
@ -257,11 +248,10 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = cbProcessComments
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 94
Width = 389
Height = 19
Top = 87
Width = 315
Caption = 'S&kip file operations errors and write them to log window'
OnChange = GenericSomethingChanged
TabOrder = 3
end
object cmbTypeOfDuplicatedRename: TComboBox
@ -271,11 +261,11 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideRight.Control = gbExecutingOperations
AnchorSideRight.Side = asrBottom
Left = 10
Height = 25
Top = 139
Height = 23
Top = 129
Width = 698
Anchors = [akTop, akLeft, akRight]
ItemHeight = 0
ItemHeight = 15
Items.Strings = (
'DC legacy - Copy (x) filename.ext'
'Windows - filename (x).ext'
@ -292,7 +282,7 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideRight.Side = asrBottom
Left = 10
Height = 15
Top = 120
Top = 110
Width = 698
Caption = 'Duplicated name auto-rename style:'
Anchors = [akTop, akLeft, akRight]
@ -306,8 +296,8 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 103
Top = 504
Height = 95
Top = 464
Width = 722
Anchors = [akTop, akLeft, akRight]
AutoSize = True
@ -317,18 +307,17 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
ChildSizing.TopBottomSpacing = 4
ChildSizing.HorizontalSpacing = 4
ChildSizing.VerticalSpacing = 4
ClientHeight = 86
ClientHeight = 77
ClientWidth = 718
TabOrder = 2
object rbUseMmapInSearch: TRadioButton
AnchorSideLeft.Control = gbFileSearch
AnchorSideTop.Control = gbFileSearch
Left = 10
Height = 22
Height = 19
Top = 4
Width = 315
Width = 252
Caption = 'Use memory mapping for search te&xt in files'
OnChange = GenericSomethingChanged
TabOrder = 0
end
object rbUseStreamInSearch: TRadioButton
@ -336,13 +325,12 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = rbUseMmapInSearch
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 32
Width = 245
Height = 19
Top = 29
Width = 192
BorderSpacing.Top = 6
Caption = '&Use stream for search text in files'
Checked = True
OnChange = GenericSomethingChanged
TabOrder = 1
TabStop = True
end
@ -351,12 +339,11 @@ inherited frmOptionsFileOperations: TfrmOptionsFileOperations
AnchorSideTop.Control = rbUseStreamInSearch
AnchorSideTop.Side = asrBottom
Left = 10
Height = 22
Top = 60
Width = 202
Height = 19
Top = 54
Width = 163
BorderSpacing.Top = 6
Caption = '&Search for part of file name'
OnChange = GenericSomethingChanged
TabOrder = 2
end
end

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
File operations options page
Copyright (C) 2006-2011 Koblov Alexander (Alexx2000@mail.ru)
Copyright (C) 2006-2015 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -61,10 +61,9 @@ type
rbUseStreamInSearch: TRadioButton;
seWipePassNumber: TSpinEdit;
procedure cbDeleteToTrashChange(Sender: TObject);
procedure GenericSomethingChanged(Sender: TObject);
private
FLoading: Boolean;
FModificationTookPlace: Boolean;
FLastLoadedOptionSignature: dword;
protected
procedure Init; override;
procedure Load; override;
@ -81,7 +80,8 @@ implementation
{$R *.lfm}
uses
fOptions, uShowMsg, DCStrUtils, uGlobs, uLng, fOptionsHotkeys;
uComponentsSignature, fOptions, uShowMsg, DCStrUtils, uGlobs, uLng,
fOptionsHotkeys;
{ TfrmOptionsFileOperations }
@ -110,7 +110,6 @@ begin
HotkeysEditor := OptionsDialog.GetEditor(TfrmOptionsHotkeys);
if Assigned(HotkeysEditor) then
(HotkeysEditor as TfrmOptionsHotkeys).AddDeleteWithShiftHotkey(cbDeleteToTrash.Checked);
GenericSomethingChanged(Sender);
end;
end;
@ -142,7 +141,7 @@ begin
cmbTypeOfDuplicatedRename.ItemIndex := Integer(gTypeOfDuplicatedRename);
FLoading := False;
FModificationTookPlace := False;
FLastLoadedOptionSignature := ComputeSignatureBasedOnComponent(Self, $00000000);
end;
function TfrmOptionsFileOperations.Save: TOptionsEditorSaveFlags;
@ -176,7 +175,7 @@ begin
if cbDeleteToTrashConfirmation.Checked then
Include(gFileOperationsConfirmations, focDeleteToTrash);
gTypeOfDuplicatedRename := tDuplicatedRename(cmbTypeOfDuplicatedRename.ItemIndex);
FModificationTookPlace := False;
FLastLoadedOptionSignature := ComputeSignatureBasedOnComponent(Self, $00000000);
end;
constructor TfrmOptionsFileOperations.Create(TheOwner: TComponent);
@ -185,16 +184,11 @@ begin
FLoading := False;
end;
procedure TfrmOptionsFileOperations.GenericSomethingChanged(Sender: TObject);
begin
FModificationTookPlace := True;
end;
function TfrmOptionsFileOperations.CanWeClose(var WillNeedUpdateWindowView: boolean): boolean;
var
Answer: TMyMsgResult;
begin
Result := not FModificationTookPlace;
Result := (FLastLoadedOptionSignature = ComputeSignatureBasedOnComponent(Self, $00000000));
if not Result then
begin

File diff suppressed because it is too large Load diff

View file

@ -1,22 +1,31 @@
TFRMOPTIONSFILEPANELSCOLORS.LBLTEXTCOLOR.CAPTION=T&ext Color:
TFRMOPTIONSFILEPANELSCOLORS.LBLBACKGROUNDCOLOR.CAPTION=Bac&kground:
TFRMOPTIONSFILEPANELSCOLORS.LBLBACKGROUNDCOLOR2.CAPTION=Backg&round 2:
TFRMOPTIONSFILEPANELSCOLORS.LBLMARKCOLOR.CAPTION=&Mark Color:
TFRMOPTIONSFILEPANELSCOLORS.LBLCURSORCOLOR.CAPTION=C&ursor Color:
TFRMOPTIONSFILEPANELSCOLORS.LBLCURSORTEXT.CAPTION=Cursor Te&xt:
TFRMOPTIONSFILEPANELSCOLORS.BTNFORECOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLBACKGROUNDCOLOR.CAPTION=Bac&kground:
TFRMOPTIONSFILEPANELSCOLORS.BTNBACKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.BTNMARKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.BTNCURSORCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.BTNCURSORTEXT.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLBACKGROUNDCOLOR2.CAPTION=Backg&round 2:
TFRMOPTIONSFILEPANELSCOLORS.BTNBACKCOLOR2.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.GBEXAMPLE.CAPTION=Example
TFRMOPTIONSFILEPANELSCOLORS.LBLMARKCOLOR.CAPTION=&Mark Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNMARKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLCURSORCOLOR.CAPTION=C&ursor Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNCURSORCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLCURSORTEXT.CAPTION=Cursor Te&xt:
TFRMOPTIONSFILEPANELSCOLORS.BTNCURSORTEXT.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLINACTIVECURSORCOLOR.CAPTION=Inactive Cursor Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNINACTIVECURSORCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLINACTIVEMARKCOLOR.CAPTION=Inactive Mark Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNINACTIVEMARKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.CBBUSEINVERTEDSELECTION.CAPTION=U&se Inverted Selection
TFRMOPTIONSFILEPANELSCOLORS.LBLINACTIVEPANELBRIGHTNESS.CAPTION=&Brightness level of inactive panel
TFRMOPTIONSFILEPANELSCOLORS.CBBUSEINACTIVESELCOLOR.CAPTION=Use Inactive Sel Color
TFRMOPTIONSFILEPANELSCOLORS.CBBUSEFRAMECURSOR.CAPTION=Use &Frame Cursor
TFRMOPTIONSFILEPANELSCOLORS.LBLINDCOLOR.CAPTION=&Indicator Fore Color:
TFRMOPTIONSFILEPANELSCOLORS.LBLINDBACKCOLOR.CAPTION=In&dicator Back Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNINDCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.BTNINDBACKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.CBBUSEGRADIENTIND.CAPTION=Use &Gradient Indicator
TFRMOPTIONSFILEPANELSCOLORS.LBLINACTIVEPANELBRIGHTNESS.CAPTION=&Brightness level of inactive panel
TFRMOPTIONSFILEPANELSCOLORS.DBFREESPACEINDICATOR.CAPTION=Drive Free Space Indicator
TFRMOPTIONSFILEPANELSCOLORS.CBBUSEGRADIENTIND.CAPTION=Use &Gradient Indicator
TFRMOPTIONSFILEPANELSCOLORS.LBLINDCOLOR.CAPTION=&Indicator Fore Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNINDCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLINDBACKCOLOR.CAPTION=In&dicator Back Color:
TFRMOPTIONSFILEPANELSCOLORS.BTNINDBACKCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.LBLPREVIEW.CAPTION=Below is a preview. You may move cursor, select file and get immediately an actual look and feel of the various settings.
TFRMOPTIONSFILEPANELSCOLORS.CBUSECURSORBORDER.CAPTION=Cursor border
TFRMOPTIONSFILEPANELSCOLORS.BTNCURSORBORDERCOLOR.CAPTION=>>
TFRMOPTIONSFILEPANELSCOLORS.BTNRESETTODCDEFAULT.CAPTION=Reset to DC default
TFRMOPTIONSFILEPANELSCOLORS.CBALLOWOVERCOLOR.CAPTION=Allow Overcolor

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
File panels colors options page
Copyright (C) 2006-2011 Koblov Alexander (Alexx2000@mail.ru)
Copyright (C) 2006-2015 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,66 +27,104 @@ unit fOptionsFilePanelsColors;
interface
uses
Classes, SysUtils, ComCtrls, StdCtrls, ColorBox, ExtCtrls, Dialogs,
DividerBevel, fOptionsFrame;
//Lazarus, Free-Pascal, etc.
Graphics, Classes, SysUtils, ComCtrls, StdCtrls, ColorBox, ExtCtrls, Dialogs,
DividerBevel,
//DC
uColumns, uColumnsFileView, fOptionsFrame;
type
{ TfrmOptionsFilePanelsColors }
TfrmOptionsFilePanelsColors = class(TOptionsEditor)
btnBackColor: TButton;
btnBackColor2: TButton;
btnCursorColor: TButton;
btnCursorText: TButton;
btnForeColor: TButton;
btnMarkColor: TButton;
btnIndColor: TButton;
btnIndBackColor: TButton;
cbBackColor: TColorBox;
cbBackColor2: TColorBox;
cbbUseFrameCursor: TCheckBox;
cbbUseInvertedSelection: TCheckBox;
cbCursorColor: TColorBox;
cbCursorText: TColorBox;
cbMarkColor: TColorBox;
cbTextColor: TColorBox;
cbIndColor: TColorBox;
cbIndBackColor: TColorBox;
cbbUseGradientInd: TCheckBox;
dbFreeSpaceIndicator: TDividerBevel;
dbOptions: TDividerBevel;
gbExample: TGroupBox;
lblIndBackColor: TLabel;
lblIndColor: TLabel;
lblBackgroundColor: TLabel;
lblBackgroundColor2: TLabel;
lblCursorColor: TLabel;
lblCursorText: TLabel;
lblInactivePanelBrightness: TLabel;
lblMarkColor: TLabel;
btnCursorBorderColor: TButton;
btnResetToDCDefault: TButton;
cbAllowOverColor: TCheckBox;
cbUseCursorBorder: TCheckBox;
cbCursorBorderColor: TColorBox;
lblTextColor: TLabel;
optColorDialog: TColorDialog;
pbExample: TPaintBox;
cbTextColor: TColorBox;
btnForeColor: TButton;
lblBackgroundColor: TLabel;
cbBackColor: TColorBox;
btnBackColor: TButton;
lblBackgroundColor2: TLabel;
cbBackColor2: TColorBox;
btnBackColor2: TButton;
lblMarkColor: TLabel;
cbMarkColor: TColorBox;
btnMarkColor: TButton;
lblCursorColor: TLabel;
cbCursorColor: TColorBox;
btnCursorColor: TButton;
lblCursorText: TLabel;
cbCursorText: TColorBox;
btnCursorText: TButton;
lblInactiveCursorColor: TLabel;
cbInactiveCursorColor: TColorBox;
btnInactiveCursorColor: TButton;
lblInactiveMarkColor: TLabel;
cbInactiveMarkColor: TColorBox;
btnInactiveMarkColor: TButton;
dbOptionsVertical: TDividerBevel;
cbbUseInvertedSelection: TCheckBox;
cbbUseInactiveSelColor: TCheckBox;
cbbUseFrameCursor: TCheckBox;
lblInactivePanelBrightness: TLabel;
spPanelSplitter: TSplitter;
tbInactivePanelBrightness: TTrackBar;
procedure btnBackColor2Click(Sender: TObject);
dbFreeSpaceIndicator: TDividerBevel;
cbbUseGradientInd: TCheckBox;
pbxFakeDrive: TPaintBox;
lblIndColor: TLabel;
cbIndColor: TColorBox;
btnIndColor: TButton;
lblIndBackColor: TLabel;
cbIndBackColor: TColorBox;
btnIndBackColor: TButton;
pnlPreviewCont: TPanel;
lblPreview: TLabel;
pnlLeftPreview: TPanel;
pnlRightPreview: TPanel;
optColorDialog: TColorDialog;
procedure btnCursorBorderColorClick(Sender: TObject);
procedure btnResetToDCDefaultClick(Sender: TObject);
procedure cbbUseFrameCursorChange(Sender: TObject);
procedure cbColorBoxChange(Sender: TObject);
procedure btnForeColorClick(Sender: TObject);
procedure btnBackColorClick(Sender: TObject);
procedure btnBackColor2Click(Sender: TObject);
procedure btnMarkColorClick(Sender: TObject);
procedure btnCursorColorClick(Sender: TObject);
procedure btnCursorTextClick(Sender: TObject);
procedure btnForeColorClick(Sender: TObject);
procedure btnIndBackColorClick(Sender: TObject);
procedure btnIndColorClick(Sender: TObject);
procedure btnMarkColorClick(Sender: TObject);
procedure btnInactiveCursorColorClick(Sender: TObject);
procedure btnInactiveMarkColorClick(Sender: TObject);
procedure cbbUseInactiveSelColorChange(Sender: TObject);
procedure cbUseCursorBorderChange(Sender: TObject);
procedure tbInactivePanelBrightnessChange(Sender: TObject);
procedure cbbUseGradientIndChange(Sender: TObject);
procedure cbColorBoxChange(Sender: TObject);
procedure pbExamplePaint(Sender: TObject);
procedure cbIndColorChange(Sender: TObject);
procedure btnIndColorClick(Sender: TObject);
procedure btnIndBackColorClick(Sender: TObject);
procedure RefreshPreviewPanel;
procedure pbxFakeDrivePaint(Sender: TObject);
procedure pnlLeftPreviewEnter(Sender: TObject);
procedure pnlRightPreviewEnter(Sender: TObject);
function JustForConfigDim(AColor: TColor): TColor;
function JustForConfigNoDim(AColor: TColor): TColor;
private
FLastLoadedOptionSignature: dword;
bLoadCompleted: boolean;
PreviewLeftPanel: TColumnsFileView;
PreviewRightPanel: TColumnsFileView;
ColumnClass: TPanelColumnsClass;
ColPrm: TColPrm;
protected
procedure Init; override;
procedure Load; override;
function Save: TOptionsEditorSaveFlags; override;
public
class function GetIconIndex: Integer; override;
class function GetTitle: String; override;
class function GetIconIndex: integer; override;
class function GetTitle: string; override;
function CanWeClose(var WillNeedUpdateWindowView: boolean): boolean; override;
end;
implementation
@ -94,304 +132,439 @@ implementation
{$R *.lfm}
uses
Graphics, Types, uLng, uGlobs, uDCUtils;
//Lazarus, Free-Pascal, etc.
Types, Forms,
//DC
uSampleForConfigFileSource, fOptions, uShowMsg, uComponentsSignature,
uFileFunctions, DCOSUtils, fMain, uFileSystemFileSource, uLng, uGlobs,
uDCUtils;
{ TfrmOptionsFilePanelsColors }
class function TfrmOptionsFilePanelsColors.GetIconIndex: Integer;
{ TfrmOptionsFilePanelsColors.GetIconIndex }
class function TfrmOptionsFilePanelsColors.GetIconIndex: integer;
begin
Result := 20;
end;
class function TfrmOptionsFilePanelsColors.GetTitle: String;
{ TfrmOptionsFilePanelsColors.GetTitle }
class function TfrmOptionsFilePanelsColors.GetTitle: string;
begin
Result := rsOptionsEditorFilePanels;
end;
{ TfrmOptionsFilePanelsColors.CanWeClose }
function TfrmOptionsFilePanelsColors.CanWeClose(var WillNeedUpdateWindowView: boolean): boolean;
var
Answer: TMyMsgResult;
begin
Result := (FLastLoadedOptionSignature = ComputeSignatureBasedOnComponent(Self, $00000000));
if not Result then
begin
ShowOptions(TfrmOptionsFilePanelsColors);
Answer := MsgBox(rsMsgFilePanelColorModifiedWantToSave, [msmbYes, msmbNo, msmbCancel], msmbCancel, msmbCancel);
case Answer of
mmrYes:
begin
Save;
WillNeedUpdateWindowView := True;
Result := True;
end;
mmrNo: Result := True;
else
Result := False;
end;
end;
end;
{ TfrmOptionsFilePanelsColors.Load }
procedure TfrmOptionsFilePanelsColors.Load;
begin
bLoadCompleted := False;
//1. Let's create the element we'll need.
ColPrm := TColPrm.Create;
ColumnClass := TPanelColumnsClass.Create;
//2. Let's load the current settings to be shown on screen
SetColorInColorBox(cbTextColor, gForeColor);
SetColorInColorBox(cbBackColor, gBackColor);
SetColorInColorBox(cbBackColor2, gBackColor2);
SetColorInColorBox(cbMarkColor, gMarkColor);
SetColorInColorBox(cbCursorColor, gCursorColor);
SetColorInColorBox(cbCursorText, gCursorText);
SetColorInColorBox(cbInactiveCursorColor, gInactiveCursorColor);
SetColorInColorBox(cbInactiveMarkColor, gInactiveMarkColor);
cbAllowOverColor.Checked := gAllowOverColor;
cbbUseInvertedSelection.Checked := gUseInvertedSelection;
cbbUseInactiveSelColor.Checked := gUseInactiveSelColor;
cbbUseFrameCursor.Checked := gUseFrameCursor;
cbUseCursorBorder.Checked := gUseCursorBorder;
SetColorInColorBox(cbCursorBorderColor, gCursorBorderColor);
tbInactivePanelBrightness.Position := gInactivePanelBrightness;
SetColorInColorBox(cbIndColor, gIndForeColor);
SetColorInColorBox(cbIndBackColor, gIndBackColor);
cbbUseInvertedSelection.Checked:= gUseInvertedSelection;
cbbUseFrameCursor.Checked:= gUseFrameCursor;
cbbUseGradientInd.Checked := gIndUseGradient;
tbInactivePanelBrightness.Position:= gInactivePanelBrightness;
//3. Let's create our preview panels
PreviewLeftPanel := TColumnsFileView.Create(pnlLeftPreview, TSampleForConfigFileSource.Create, SAMPLE_PATH);
PreviewLeftPanel.JustForColorPreviewSetActiveState(True);
PreviewLeftPanel.SetGridFunctionDim(@JustForConfigNoDim);
PreviewRightPanel := TColumnsFileView.Create(pnlRightPreview, TSampleForConfigFileSource.Create, SAMPLE_PATH);
PreviewRightPanel.JustForColorPreviewSetActiveState(False);
PreviewRightPanel.SetGridFunctionDim(@JustForConfigDim);
//4. Let's define which ColumnClass it's gonna follow
PreviewLeftPanel.ActiveColmSlave := ColumnClass;
PreviewLeftPanel.isSlave := True;
PreviewRightPanel.ActiveColmSlave := ColumnClass;
PreviewRightPanel.isSlave := True;
//5. Let's refresh the panel so we will show something
RefreshPreviewPanel;
//6. Good. Loading is completed.
bLoadCompleted := True;
FLastLoadedOptionSignature := ComputeSignatureBasedOnComponent(Self, $00000000);
end;
{ TfrmOptionsFilePanelsColors.Save }
function TfrmOptionsFilePanelsColors.Save: TOptionsEditorSaveFlags;
begin
gForeColor := cbTextColor.Selected;
gBackColor := cbBackColor.Selected; // background color
gBackColor := cbBackColor.Selected;
gBackColor2 := cbBackColor2.Selected;
gMarkColor := cbMarkColor.Selected;
gCursorColor := cbCursorColor.Selected;
gCursorText := cbCursorText.Selected;
gIndForeColor := cbIndColor.Selected;
gIndBackColor := cbIndBackColor.Selected;
gInactiveCursorColor := cbInactiveCursorColor.Selected;
gInactiveMarkColor := cbInactiveMarkColor.Selected;
gUseInvertedSelection := cbbUseInvertedSelection.Checked;
gInactivePanelBrightness := tbInactivePanelBrightness.Position;
gAllowOverColor := cbAllowOverColor.Checked;
gUseInactiveSelColor := cbbUseInactiveSelColor.Checked;
gUseFrameCursor := cbbUseFrameCursor.Checked;
gUseCursorBorder := cbUseCursorBorder.Checked;
gCursorBorderColor := cbCursorBorderColor.Selected;
gInactivePanelBrightness := tbInactivePanelBrightness.Position;
gIndUseGradient := cbbUseGradientInd.Checked;
gIndForeColor := cbIndColor.Selected;
gIndBackColor := cbIndBackColor.Selected;
FLastLoadedOptionSignature := ComputeSignatureBasedOnComponent(Self, $00000000);
Result := [];
end;
procedure TfrmOptionsFilePanelsColors.btnBackColor2Click(Sender: TObject);
{ TfrmOptionsFilePanelsColors.cbColorBoxChange }
procedure TfrmOptionsFilePanelsColors.cbColorBoxChange(Sender: TObject);
begin
optColorDialog.Color:= cbBackColor2.Selected;
if bLoadCompleted then
RefreshPreviewPanel;
end;
procedure TfrmOptionsFilePanelsColors.btnCursorBorderColorClick(Sender: TObject);
begin
optColorDialog.Color := cbCursorBorderColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbBackColor2, optColorDialog.Color);
pbExample.Repaint;
SetColorInColorBox(cbCursorBorderColor, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
procedure TfrmOptionsFilePanelsColors.btnBackColorClick(Sender: TObject);
procedure TfrmOptionsFilePanelsColors.btnResetToDCDefaultClick(Sender: TObject);
begin
optColorDialog.Color:= cbBackColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbBackColor, optColorDialog.Color);
pbExample.Repaint;
end;
SetColorInColorBox(cbTextColor, clWindowText);
SetColorInColorBox(cbBackColor, clWindow);
SetColorInColorBox(cbBackColor2, clWindow);
SetColorInColorBox(cbMarkColor, clRed);
SetColorInColorBox(cbCursorColor, clHighlight);
SetColorInColorBox(cbCursorText, clHighlightText);
SetColorInColorBox(cbInactiveCursorColor, clInactiveCaption);
SetColorInColorBox(cbInactiveMarkColor, clMaroon);
cbAllowOverColor.Checked := True;
cbbUseInvertedSelection.Checked := False;
cbbUseInactiveSelColor.Checked := False;
cbbUseFrameCursor.Checked := False;
cbUseCursorBorder.Checked := False;
SetColorInColorBox(cbCursorBorderColor, clHighlight);
tbInactivePanelBrightness.Position := 100;
SetColorInColorBox(cbIndColor, clBlack);
SetColorInColorBox(cbIndBackColor, clWhite);
cbbUseGradientInd.Checked := True;
cbbUseFrameCursorChange(cbbUseFrameCursor);
end;
procedure TfrmOptionsFilePanelsColors.btnCursorColorClick(Sender: TObject);
procedure TfrmOptionsFilePanelsColors.cbbUseFrameCursorChange(Sender: TObject);
begin
optColorDialog.Color:= cbCursorColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbCursorColor, optColorDialog.Color);
pbExample.Repaint;
end;
end;
procedure TfrmOptionsFilePanelsColors.btnCursorTextClick(Sender: TObject);
begin
optColorDialog.Color:= cbCursorText.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbCursorText, optColorDialog.Color);
pbExample.Repaint;
end;
cbUseCursorBorder.Enabled := not cbbUseFrameCursor.Checked;
lblCursorText.Enabled := not cbbUseFrameCursor.Checked;
cbCursorText.Enabled := not cbbUseFrameCursor.Checked;
btnCursorText.Enabled := not cbbUseFrameCursor.Checked;
if not cbbUseFrameCursor.Checked then
cbCursorText.Font.Color := clDefault
else
cbCursorText.Font.Color := clInactiveCaption;
cbUseCursorBorderChange(cbUseCursorBorder);
end;
{ TfrmOptionsFilePanelsColors.btnForeColorClick }
procedure TfrmOptionsFilePanelsColors.btnForeColorClick(Sender: TObject);
begin
optColorDialog.Color:= cbTextColor.Selected;
optColorDialog.Color := cbTextColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbTextColor, optColorDialog.Color);
pbExample.Repaint;
RefreshPreviewPanel;
end;
end;
procedure TfrmOptionsFilePanelsColors.btnIndBackColorClick(Sender: TObject);
{ TfrmOptionsFilePanelsColors.btnBackColorClick }
procedure TfrmOptionsFilePanelsColors.btnBackColorClick(Sender: TObject);
begin
optColorDialog.Color:= cbIndBackColor.Selected;
optColorDialog.Color := cbBackColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbIndBackColor, optColorDialog.Color);
//pbExample.Repaint;
SetColorInColorBox(cbBackColor, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
procedure TfrmOptionsFilePanelsColors.btnIndColorClick(Sender: TObject);
{ TfrmOptionsFilePanelsColors.btnBackColor2Click }
procedure TfrmOptionsFilePanelsColors.btnBackColor2Click(Sender: TObject);
begin
optColorDialog.Color:= cbIndColor.Selected;
optColorDialog.Color := cbBackColor2.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbIndColor, optColorDialog.Color);
//pbExample.Repaint;
SetColorInColorBox(cbBackColor2, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.btnMarkColorClick }
procedure TfrmOptionsFilePanelsColors.btnMarkColorClick(Sender: TObject);
begin
optColorDialog.Color:= cbMarkColor.Selected;
optColorDialog.Color := cbMarkColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbMarkColor, optColorDialog.Color);
pbExample.Repaint;
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.btnCursorColorClick }
procedure TfrmOptionsFilePanelsColors.btnCursorColorClick(Sender: TObject);
begin
optColorDialog.Color := cbCursorColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbCursorColor, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.btnCursorTextClick }
procedure TfrmOptionsFilePanelsColors.btnCursorTextClick(Sender: TObject);
begin
optColorDialog.Color := cbCursorText.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbCursorText, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.btnInactiveCursorColorClick }
procedure TfrmOptionsFilePanelsColors.btnInactiveCursorColorClick(Sender: TObject);
begin
optColorDialog.Color := cbInactiveCursorColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbInactiveCursorColor, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.btnInactiveMarkColorClick }
procedure TfrmOptionsFilePanelsColors.btnInactiveMarkColorClick(Sender: TObject);
begin
optColorDialog.Color := cbInactiveMarkColor.Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(cbInactiveMarkColor, optColorDialog.Color);
RefreshPreviewPanel;
end;
end;
{ TfrmOptionsFilePanelsColors.cbbUseInactiveSelColorChange }
procedure TfrmOptionsFilePanelsColors.cbbUseInactiveSelColorChange(Sender: TObject);
begin
if bLoadCompleted then
begin
lblInactiveCursorColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
cbInactiveCursorColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
btnInactiveCursorColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
lblInactiveMarkColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
cbInactiveMarkColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
btnInactiveMarkColor.Enabled := cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled;
if cbbUseInactiveSelColor.Checked and cbbUseInactiveSelColor.Enabled then
begin
cbInactiveCursorColor.Font.Color := clDefault;
cbInactiveMarkColor.Font.Color := clDefault;
end
else
begin
cbInactiveCursorColor.Font.Color := clInactiveCaption;
cbInactiveMarkColor.Font.Color := clInactiveCaption;
end;
RefreshPreviewPanel;
end;
end;
procedure TfrmOptionsFilePanelsColors.cbUseCursorBorderChange(Sender: TObject);
begin
cbCursorBorderColor.Enabled := cbUseCursorBorder.Checked and cbUseCursorBorder.Enabled;
btnCursorBorderColor.Enabled := cbUseCursorBorder.Checked and cbUseCursorBorder.Enabled;
if cbUseCursorBorder.Checked and cbUseCursorBorder.Enabled then
cbCursorBorderColor.Font.Color := clDefault
else
cbCursorBorderColor.Font.Color := clInactiveCaption;
if bLoadCompleted then
RefreshPreviewPanel;
end;
{ TfrmOptionsFilePanelsColors.tbInactivePanelBrightnessChange }
procedure TfrmOptionsFilePanelsColors.tbInactivePanelBrightnessChange(Sender: TObject);
begin
if bLoadCompleted then
begin
PreviewLeftPanel.UpdateColumnsView;
PreviewLeftPanel.Reload;
PreviewRightPanel.UpdateColumnsView;
PreviewRightPanel.Reload;
end;
end;
{ TfrmOptionsFilePanelsColors.cbbUseGradientIndChange }
procedure TfrmOptionsFilePanelsColors.cbbUseGradientIndChange(Sender: TObject);
begin
lblIndColor.Enabled := not(cbbUseGradientInd.Checked);
lblIndBackColor.Enabled := not(cbbUseGradientInd.Checked);
cbIndColor.Enabled := not(cbbUseGradientInd.Checked);
cbIndBackColor.Enabled := not(cbbUseGradientInd.Checked);
btnIndColor.Enabled := not(cbbUseGradientInd.Checked);
btnIndBackColor.Enabled := not(cbbUseGradientInd.Checked);
lblIndColor.Enabled := not (cbbUseGradientInd.Checked);
lblIndBackColor.Enabled := not (cbbUseGradientInd.Checked);
cbIndColor.Enabled := not (cbbUseGradientInd.Checked);
cbIndBackColor.Enabled := not (cbbUseGradientInd.Checked);
btnIndColor.Enabled := not (cbbUseGradientInd.Checked);
btnIndBackColor.Enabled := not (cbbUseGradientInd.Checked);
pbxFakeDrive.Repaint;
end;
procedure TfrmOptionsFilePanelsColors.cbColorBoxChange(Sender: TObject);
{ TfrmOptionsFilePanelsColors.cbIndColorChange }
procedure TfrmOptionsFilePanelsColors.cbIndColorChange(Sender: TObject);
begin
pbExample.Repaint;
pbxFakeDrive.Repaint;
end;
procedure TfrmOptionsFilePanelsColors.pbExamplePaint(Sender: TObject);
var
h, I : integer;
sText : String;
iTextTop, iTextLeft : Integer;
Rect : TRect;
{ TfrmOptionsFilePanelsColors.btnIndColorClick }
procedure TfrmOptionsFilePanelsColors.btnIndColorClick(Sender: TObject);
begin
h := pbExample.Height div 6;
Rect.Left := 0;
Rect.Top := 0;
Rect.Right := pbExample.Width;
Rect.Bottom := h;
for I := 1 to 6 do
with pbExample.Canvas do
optColorDialog.Color := cbIndColor.Selected;
if optColorDialog.Execute then
begin
case I of
1:
begin
if cbbUseInvertedSelection.Checked then
begin
Brush.Color := cbMarkColor.Selected;
Font.Color := cbTextColor.Selected;
sText := rsOptExampleMark;
end
else
begin
Brush.Color := cbBackColor.Selected;
Font.Color := cbMarkColor.Selected;
sText := rsOptExampleMark;
end;
end;
2:
begin
if cbbUseInvertedSelection.Checked then
begin
Brush.Color := cbMarkColor.Selected;
Font.Color := cbTextColor.Selected;
sText := rsOptExampleMark;
end
else
begin
Brush.Color := cbBackColor2.Selected;
Font.Color := cbMarkColor.Selected;
sText := rsOptExampleMark;
end;
end;
3:
begin
Brush.Color := cbBackColor.Selected;
Font.Color := cbTextColor.Selected;
sText := rsOptExampleText;
end;
4:
begin
Brush.Color := cbBackColor2.Selected;
Font.Color := cbTextColor.Selected;
sText := rsOptExampleText;
end;
5:
begin
if cbbUseFrameCursor.Checked then
begin
Pen.Color := cbCursorColor.Selected;
Brush.Color := cbBackColor.Selected;
end
else Brush.Color := cbCursorColor.Selected;
Font.Color := cbCursorText.Selected;
sText := rsOptExampleCursor;
end;
6:
begin
if cbbUseInvertedSelection.Checked then
begin
if cbbUseFrameCursor.Checked then
begin
Pen.Color := cbCursorColor.Selected;
Brush.Color := cbBackColor.Selected;
Font.Color := cbMarkColor.Selected;
end
else
begin
Brush.Color := cbCursorColor.Selected;
Font.Color :=InvertColor(cbCursorText.Selected);
end;
sText := rsOptExampleMarkCursor;
end
else
begin
if cbbUseFrameCursor.Checked then
begin
Pen.Color := cbCursorColor.Selected;
Brush.Color := cbBackColor.Selected;
Font.Color := cbMarkColor.Selected;
end
else
begin
Brush.Color := cbCursorColor.Selected;
Font.Color := cbMarkColor.Selected;
end;
sText := rsOptExampleMarkCursor;
end;
end;
end; // case
with gFonts[dcfMain] do
begin
Font.Style := Style;
Font.Size := Size;
Font.Name := Name;
end;
iTextTop := Rect.Top + (h div 2) - (TextHeight(sText) div 2);
iTextLeft := Rect.Left + (pbExample.Width div 2) - (TextWidth(sText) div 2);
FillRect(Rect);
if (cbbUseFrameCursor.Checked) and ((i=5) or (i=6)) then
begin
Pen.Color:=cbCursorColor.Selected;
Line(Rect.Left, Rect.Top, Rect.Right, Rect.Top);
Line(Rect.Left, Rect.Bottom - 1, Rect.Right, Rect.Bottom - 1);
end;
TextOut(iTextLeft, iTextTop, sText);
Rect.Top := Rect.Bottom;
Rect.Bottom := h * (I + 1);
end; // for
end;
procedure TfrmOptionsFilePanelsColors.Init;
procedure CalcMaxSize(var MaxSize: TSize; Text: String);
var
TextSize: TSize;
begin
TextSize := Canvas.TextExtent(Text);
if TextSize.cx > MaxSize.cx then
MaxSize.cx := TextSize.cx;
if TextSize.cy > MaxSize.cy then
MaxSize.cy := TextSize.cy;
SetColorInColorBox(cbIndColor, optColorDialog.Color);
pbxFakeDrive.Repaint;
end;
var
TextSize: TSize = (cx: 0; cy: 0);
end;
{ TfrmOptionsFilePanelsColors.btnIndBackColorClick }
procedure TfrmOptionsFilePanelsColors.btnIndBackColorClick(Sender: TObject);
begin
with gFonts[dcfMain] do
optColorDialog.Color := cbIndBackColor.Selected;
if optColorDialog.Execute then
begin
Canvas.Font.Style := Style;
Canvas.Font.Size := Size;
Canvas.Font.Name := Name;
SetColorInColorBox(cbIndBackColor, optColorDialog.Color);
pbxFakeDrive.Repaint;
end;
end;
CalcMaxSize(TextSize, rsOptExampleMark);
CalcMaxSize(TextSize, rsOptExampleText);
CalcMaxSize(TextSize, rsOptExampleCursor);
CalcMaxSize(TextSize, rsOptExampleMarkCursor);
{ TfrmOptionsFilePanelsColors.RefreshPreviewPanel }
procedure TfrmOptionsFilePanelsColors.RefreshPreviewPanel;
const
DCFunc = '[DC().%s{}]';
var
indx: integer;
begin
//Set color
ColPrm.FontName := gFonts[dcfMain].Name;
ColPrm.FontSize := gFonts[dcfMain].Size;
ColPrm.FontStyle := gFonts[dcfMain].Style;
ColPrm.Overcolor := cbAllowOverColor.Checked;
ColPrm.UseInvertedSelection := cbbUseInvertedSelection.Checked;
ColPrm.UseInactiveSelColor := cbbUseInactiveSelColor.Checked;
ColPrm.TextColor := cbTextColor.Selected;
ColPrm.Background := cbBackColor.Selected;
ColPrm.Background2 := cbBackColor2.Selected;
ColPrm.MarkColor := cbMarkColor.Selected;
ColPrm.CursorColor := cbCursorColor.Selected;
ColPrm.CursorText := cbCursorText.Selected;
ColPrm.InactiveCursorColor := cbInactiveCursorColor.Selected;
ColPrm.InactiveMarkColor := cbInactiveMarkColor.Selected;
pbExample.Constraints.MinWidth := TextSize.cx + 20;
pbExample.Constraints.MinHeight := (TextSize.cy + 4) * 6;
ColumnClass.Clear;
ColumnClass.Add(rsColName, Format(DCFunc, [TFileFunctionStrings[fsfNameNoExtension]]), 200, taLeftJustify);
ColumnClass.Add(rsColExt, Format(DCFunc, [TFileFunctionStrings[fsfExtension]]), 70, taLeftJustify);
ColumnClass.Add(rsColSize, Format(DCFunc, [TFileFunctionStrings[fsfSize]]), 90, taRightJustify);
for indx := 0 to pred(ColumnClass.Count) do
ColumnClass.SetColumnPrm(Indx, ColPrm);
ColumnClass.CustomView := True;
ColumnClass.UseFrameCursor := cbbUseFrameCursor.Checked;
ColumnClass.CursorBorderColor := clRed;
ColumnClass.UseFrameCursor := cbbUseFrameCursor.Checked;
ColumnClass.UseCursorBorder := cbUseCursorBorder.Checked;
ColumnClass.CursorBorderColor := cbCursorBorderColor.Selected;
ColumnClass.Name := 'JustForSetup';
PreviewLeftPanel.UpdateColumnsView;
PreviewRightPanel.UpdateColumnsView;
end;
{ TfrmOptionsFilePanelsColors.pbxFakeDrivePaint }
procedure TfrmOptionsFilePanelsColors.pbxFakeDrivePaint(Sender: TObject);
begin
frmMain.PaintDriveFreeBar(pbxFakeDrive, cbbUseGradientInd.Checked, cbIndColor.Selected, cbIndBackColor.Selected);
end;
{ TfrmOptionsFilePanelsColors.pnlLeftPreviewEnter }
procedure TfrmOptionsFilePanelsColors.pnlLeftPreviewEnter(Sender: TObject);
begin
PreviewRightPanel.SetGridFunctionDim(@JustForConfigDim);
PreviewRightPanel.JustForColorPreviewSetActiveState(False);
PreviewLeftPanel.SetGridFunctionDim(@JustForConfigNoDim);
PreviewLeftPanel.JustForColorPreviewSetActiveState(True);
end;
{ TfrmOptionsFilePanelsColors.pnlRightPreviewEnter }
procedure TfrmOptionsFilePanelsColors.pnlRightPreviewEnter(Sender: TObject);
begin
PreviewLeftPanel.SetGridFunctionDim(@JustForConfigDim);
PreviewLeftPanel.JustForColorPreviewSetActiveState(False);
PreviewRightPanel.SetGridFunctionDim(@JustForConfigNoDim);
PreviewRightPanel.JustForColorPreviewSetActiveState(True);
end;
{ TfrmOptionsFilePanelsColors.JustForConfigDim }
function TfrmOptionsFilePanelsColors.JustForConfigDim(AColor: TColor): TColor;
begin
if (tbInactivePanelBrightness.Position < 100) then
Result := ModColor(AColor, tbInactivePanelBrightness.Position);
end;
{ TfrmOptionsFilePanelsColors.JustForConfigNoDim }
function TfrmOptionsFilePanelsColors.JustForConfigNoDim(AColor: TColor): TColor;
begin
Result := AColor;
end;
end.