mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: New panel color and custom columns configuration dialog (patch by Denis Bisson)
This commit is contained in:
parent
4cfdf604e0
commit
a3dd9a92b1
13 changed files with 4507 additions and 969 deletions
109
src/filesources/usampleforconfigfilesource.pas
Normal file
109
src/filesources/usampleforconfigfilesource.pas
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
unit uSampleForConfigFileSource;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
uFile,
|
||||
uLocalFileSource,
|
||||
uFileSourceOperation,
|
||||
uFileSourceProperty,
|
||||
uFileSourceOperationTypes,
|
||||
uFileProperty;
|
||||
|
||||
const
|
||||
SAMPLE_PATH = PathDelim+PathDelim+'DoubleCommander'+PathDelim;
|
||||
|
||||
type
|
||||
|
||||
ISampleForConfigFileSource = interface(ILocalFileSource)
|
||||
['{C7D75C6D-38B6-4038-B3C4-4BB200A6FF28}']
|
||||
end;
|
||||
|
||||
{en
|
||||
File source for configuration purpose, just fake files.
|
||||
}
|
||||
|
||||
{ TSampleForConfigFileSource }
|
||||
|
||||
TSampleForConfigFileSource = class(TLocalFileSource, ISampleForConfigFileSource)
|
||||
protected
|
||||
function GetSupportedFileProperties: TFilePropertiesTypes; override;
|
||||
|
||||
public
|
||||
function GetRootDir(sPath : String): String; override;
|
||||
function GetProperties: TFileSourceProperties; override;
|
||||
function SetCurrentWorkingDirectory(NewDir: String): Boolean; override;
|
||||
// Retrieve operations permitted on the source. = capabilities?
|
||||
function GetOperationsTypes: TFileSourceOperationTypes; override;
|
||||
|
||||
class function CreateFile(const APath: String): TFile; override;
|
||||
|
||||
function CreateListOperation(TargetPath: String): TFileSourceOperation; override;
|
||||
|
||||
function GetLocalName(var aFile: TFile): Boolean; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
uFileSystemFileSource, uSampleForConfigListOperation, uLng;
|
||||
|
||||
function TSampleForConfigFileSource.GetRootDir(sPath: String): String;
|
||||
begin
|
||||
Result:=sPath;
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.GetProperties: TFileSourceProperties;
|
||||
begin
|
||||
Result := [fspVirtual];
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.SetCurrentWorkingDirectory(NewDir: String): Boolean;
|
||||
begin
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.CreateListOperation(TargetPath: String): TFileSourceOperation;
|
||||
begin
|
||||
Result := TSampleForConfigListOperation.Create(Self, TargetPath);
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.GetLocalName(var aFile: TFile): Boolean;
|
||||
begin
|
||||
Result:= True;
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.GetOperationsTypes: TFileSourceOperationTypes;
|
||||
begin
|
||||
Result := [fsoList];
|
||||
end;
|
||||
|
||||
function TSampleForConfigFileSource.GetSupportedFileProperties: TFilePropertiesTypes;
|
||||
begin
|
||||
Result := [fpName, fpSize];
|
||||
end;
|
||||
|
||||
class function TSampleForConfigFileSource.CreateFile(const APath: String): TFile;
|
||||
begin
|
||||
Result := TFile.Create(APath);
|
||||
|
||||
with Result do
|
||||
begin
|
||||
AttributesProperty := TFileAttributesProperty.CreateOSAttributes;
|
||||
SizeProperty := TFileSizeProperty.Create;
|
||||
ModificationTimeProperty := TFileModificationDateTimeProperty.Create;
|
||||
CreationTimeProperty := TFileCreationDateTimeProperty.Create;
|
||||
LastAccessTimeProperty := TFileLastAccessDateTimeProperty.Create;
|
||||
LinkProperty := TFileLinkProperty.Create;
|
||||
OwnerProperty := TFileOwnerProperty.Create;
|
||||
TypeProperty := TFileTypeProperty.Create;
|
||||
CommentProperty := TFileCommentProperty.Create;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
62
src/filesources/usampleforconfiglistoperation.pas
Normal file
62
src/filesources/usampleforconfiglistoperation.pas
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
unit uSampleForConfigListOperation;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
uFileSourceListOperation,
|
||||
uFileSource,
|
||||
uSampleForConfigFileSource;
|
||||
type
|
||||
|
||||
TSampleForConfigListOperation = class(TFileSourceListOperation)
|
||||
private
|
||||
FFileSource: ISampleForConfigFileSource;
|
||||
public
|
||||
constructor Create(aFileSource: IFileSource; aPath: string); override;
|
||||
procedure MainExecute; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
uFile;
|
||||
constructor TSampleForConfigListOperation.Create(aFileSource: IFileSource; aPath: string);
|
||||
begin
|
||||
FFiles := TFiles.Create(aPath);
|
||||
FFileSource := aFileSource as ISampleForConfigFileSource;
|
||||
inherited Create(aFileSource, aPath);
|
||||
end;
|
||||
|
||||
procedure TSampleForConfigListOperation.MainExecute;
|
||||
var
|
||||
FakeFile: TFile;
|
||||
IndexFile: integer;
|
||||
const
|
||||
BaseName: array[0..11] of string = ('config', 'Step', 'Prog', 'setup', 'Report', 'Skip', 'Closer', 'Face', 'Win', 'Unix', 'App', 'Klopp');
|
||||
SuffixName: array[0..11] of string = ('red', 'new', 'fst', 'South', 'slow', 'Cheap', 'dc', 'config', 'stop', 'Batch', 'Bash', 'rgctvcvt');
|
||||
ExtName: array[0..11] of string = ('bin', 'exe', 'txt', 's19', 'Rar', 'zip', 'xlsx', 'pdf', 'cpp', 'pas', 'DPR', 'tmp');
|
||||
|
||||
begin
|
||||
FFiles.Clear;
|
||||
|
||||
randseed:=Trunc(now); // Random from a day to another, but not during the day. So during the day, user will do refresh and always the same thing is re-shown.
|
||||
|
||||
for Indexfile := 1 to 30 do
|
||||
begin
|
||||
FakeFile := TSampleForConfigFileSource.CreateFile(SAMPLE_PATH);
|
||||
FakeFile.Name := BaseName[random(12)] + SuffixName[random(12)] + '.' + ExtName[random(12)];
|
||||
FakeFile.Size := 5000 + random(1000000);
|
||||
FFiles.Add(FakeFile);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -21,6 +21,8 @@ uses
|
|||
uFileViewWithGrid;
|
||||
|
||||
type
|
||||
TFunctionDime = function (AColor: TColor): TColor of Object;
|
||||
|
||||
TColumnsSortDirections = array of TSortDirection;
|
||||
TColumnsFileView = class;
|
||||
|
||||
|
|
@ -49,6 +51,8 @@ type
|
|||
aState: TGridDrawState); override;
|
||||
|
||||
public
|
||||
ColumnsOwnDim: TFunctionDime;
|
||||
|
||||
constructor Create(AOwner: TComponent; AParent: TWinControl); reintroduce;
|
||||
|
||||
procedure UpdateView;
|
||||
|
|
@ -70,8 +74,11 @@ type
|
|||
|
||||
property GridVertLine: Boolean read GetGridVertLine write SetGridVertLine;
|
||||
property GridHorzLine: Boolean read GetGridHorzLine write SetGridHorzLine;
|
||||
|
||||
end;
|
||||
|
||||
TColumnResized = procedure (Sender: TObject; ColumnIndex: Integer; ColumnNewsize: integer) of object;
|
||||
|
||||
{ TColumnsFileView }
|
||||
|
||||
TColumnsFileView = class(TFileViewWithMainCtrl)
|
||||
|
|
@ -83,6 +90,7 @@ type
|
|||
|
||||
pmColumnsMenu: TPopupMenu;
|
||||
dgPanel: TDrawGridEx;
|
||||
FOnColumnResized: TColumnResized;
|
||||
|
||||
function GetColumnsClass: TPanelColumnsClass;
|
||||
|
||||
|
|
@ -124,6 +132,7 @@ type
|
|||
procedure dgPanelSelection(Sender: TObject; aCol, aRow: Integer);
|
||||
procedure dgPanelTopLeftChanged(Sender: TObject);
|
||||
procedure dgPanelResize(Sender: TObject);
|
||||
procedure dgPanelHeaderSized(Sender: TObject; IsColumn: Boolean; index: Integer);
|
||||
procedure ColumnsMenuClick(Sender: TObject);
|
||||
|
||||
protected
|
||||
|
|
@ -173,7 +182,9 @@ type
|
|||
procedure SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode); override;
|
||||
|
||||
procedure UpdateColumnsView;
|
||||
procedure SetGridFunctionDim(ExternalDimFunction:TFunctionDime);
|
||||
|
||||
property OnColumnResized: TColumnResized read FOnColumnResized write FOnColumnResized;
|
||||
published
|
||||
procedure cm_CopyFileDetailsToClip(const Params: array of string);
|
||||
|
||||
|
|
@ -186,7 +197,6 @@ uses
|
|||
uDCUtils, math, fMain, fOptions,
|
||||
uOrderedFileView,
|
||||
uFileSourceProperty,
|
||||
fColumnsSetConf,
|
||||
uKeyboard,
|
||||
uFileFunctions,
|
||||
uFormCommands,
|
||||
|
|
@ -428,6 +438,11 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TColumnsfileView.SetGridFunctionDim(ExternalDimFunction:TFunctionDime);
|
||||
begin
|
||||
dgPanel.ColumnsOwnDim:=ExternalDimFunction;
|
||||
end;
|
||||
|
||||
procedure TColumnsFileView.ShowRenameFileEdit(aFile: TFile);
|
||||
var
|
||||
ALeft, ATop, AWidth, AHeight: Integer;
|
||||
|
|
@ -669,8 +684,8 @@ begin
|
|||
SetColumns;
|
||||
SetColumnsSortDirections;
|
||||
|
||||
dgPanel.FocusRectVisible := ColumnsClass.GetCursorBorder and not gUseFrameCursor;
|
||||
dgPanel.FocusColor := ColumnsClass.GetCursorBorderColor;
|
||||
dgPanel.FocusRectVisible := ColumnsClass.UseCursorBorder and not ColumnsClass.UseFrameCursor;
|
||||
dgPanel.FocusColor := ColumnsClass.CursorBorderColor;
|
||||
dgPanel.UpdateView;
|
||||
|
||||
OldFilePropertiesNeeded := FilePropertiesNeeded;
|
||||
|
|
@ -682,38 +697,9 @@ begin
|
|||
end;
|
||||
|
||||
procedure TColumnsFileView.ColumnsMenuClick(Sender: TObject);
|
||||
var
|
||||
frmColumnsSetConf: TfColumnsSetConf;
|
||||
Index: Integer;
|
||||
Msg: TEachViewCallbackMsg;
|
||||
begin
|
||||
Case (Sender as TMenuItem).Tag of
|
||||
1000: //This
|
||||
begin
|
||||
frmColumnsSetConf := TfColumnsSetConf.Create(nil);
|
||||
try
|
||||
Msg.Reason := evcrUpdateColumns;
|
||||
Msg.UpdatedColumnsSetName := ActiveColm;
|
||||
|
||||
{EDIT Set}
|
||||
frmColumnsSetConf.edtNameofColumnsSet.Text:=ColSet.GetColumnSet(ActiveColm).CurrentColumnsSetName;
|
||||
Index:=ColSet.Items.IndexOf(ActiveColm);
|
||||
frmColumnsSetConf.lbNrOfColumnsSet.Caption:=IntToStr(1 + Index);
|
||||
frmColumnsSetConf.Tag:=Index;
|
||||
frmColumnsSetConf.SetColumnsClass(GetColumnsClass);
|
||||
{EDIT Set}
|
||||
if frmColumnsSetConf.ShowModal = mrOK then
|
||||
begin
|
||||
// Force saving changes to config file.
|
||||
SaveGlobs;
|
||||
Msg.NewColumnsSetName := frmColumnsSetConf.GetColumnsClass.Name;
|
||||
frmMain.ForEachView(@EachViewUpdateColumns, @Msg);
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(frmColumnsSetConf);
|
||||
end;
|
||||
end;
|
||||
1001: //All columns
|
||||
1001: //All columns, but current one will be selected.
|
||||
begin
|
||||
ShowOptions(TfrmOptionsCustomColumns);
|
||||
end;
|
||||
|
|
@ -729,6 +715,7 @@ end;
|
|||
constructor TColumnsFileView.Create(AOwner: TWinControl; AFileSource: IFileSource; APath: String; AFlags: TFileViewFlags = []);
|
||||
begin
|
||||
ActiveColm := 'Default';
|
||||
FOnColumnResized := nil;
|
||||
inherited Create(AOwner, AFileSource, APath, AFlags);
|
||||
end;
|
||||
|
||||
|
|
@ -771,6 +758,7 @@ begin
|
|||
{$ENDIF}
|
||||
dgPanel.OnTopLeftChanged:= @dgPanelTopLeftChanged;
|
||||
dgpanel.OnResize:= @dgPanelResize;
|
||||
dgPanel.OnHeaderSized:= @dgPanelHeaderSized;
|
||||
|
||||
pmColumnsMenu := TPopupMenu.Create(Self);
|
||||
pmColumnsMenu.Parent := Self;
|
||||
|
|
@ -1046,6 +1034,15 @@ begin
|
|||
dgPanel.Hint:= #32;
|
||||
end;
|
||||
|
||||
procedure TColumnsFileView.dgPanelHeaderSized(Sender: TObject; IsColumn: Boolean; index: Integer);
|
||||
begin
|
||||
if IsColumn then
|
||||
if Assigned(FOnColumnResized) then
|
||||
begin
|
||||
FOnColumnResized(Self, index, dgPanel.ColWidths[index]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TColumnsFileView.cm_CopyFileDetailsToClip(const Params: array of string);
|
||||
var
|
||||
I: Integer;
|
||||
|
|
@ -1101,6 +1098,7 @@ begin
|
|||
inherited Create(AOwner);
|
||||
|
||||
ColumnsView := AParent as TColumnsFileView;
|
||||
ColumnsOwnDim := @ColumnsView.DimColor;
|
||||
|
||||
// Workaround for Lazarus issue 18832.
|
||||
// Set Fixed... before setting ...Count.
|
||||
|
|
@ -1403,23 +1401,28 @@ var
|
|||
TextColor: TColor = clDefault;
|
||||
BackgroundColor: TColor;
|
||||
IsCursor: Boolean;
|
||||
IsCursorInactive: Boolean;
|
||||
//---------------------
|
||||
begin
|
||||
Canvas.Font.Name := ColumnsSet.GetColumnFontName(ACol);
|
||||
Canvas.Font.Size := ColumnsSet.GetColumnFontSize(ACol);
|
||||
Canvas.Font.Style := ColumnsSet.GetColumnFontStyle(ACol);
|
||||
|
||||
IsCursor := (gdSelected in aState) and ColumnsView.Active and (not gUseFrameCursor);
|
||||
IsCursor := (gdSelected in aState) and ColumnsView.Active and (not ColumnsSet.UseFrameCursor);
|
||||
IsCursorInactive := (gdSelected in aState) and (not ColumnsView.Active) and (not ColumnsSet.UseFrameCursor);
|
||||
// Set up default background color first.
|
||||
if IsCursor then
|
||||
BackgroundColor := ColumnsSet.GetColumnCursorColor(ACol)
|
||||
else
|
||||
begin
|
||||
// Alternate rows background color.
|
||||
if odd(ARow) then
|
||||
BackgroundColor := ColumnsSet.GetColumnBackground(ACol)
|
||||
if IsCursorInactive AND ColumnsSet.GetColumnUseInactiveSelColor(ACol) then
|
||||
BackgroundColor := ColumnsSet.GetColumnInactiveCursorColor(ACol)
|
||||
else
|
||||
BackgroundColor := ColumnsSet.GetColumnBackground2(ACol);
|
||||
// Alternate rows background color.
|
||||
if odd(ARow) then
|
||||
BackgroundColor := ColumnsSet.GetColumnBackground(ACol)
|
||||
else
|
||||
BackgroundColor := ColumnsSet.GetColumnBackground2(ACol);
|
||||
end;
|
||||
|
||||
// Set text color.
|
||||
|
|
@ -1430,23 +1433,29 @@ var
|
|||
|
||||
if AFile.Selected then
|
||||
begin
|
||||
if gUseInvertedSelection then
|
||||
if ColumnsSet.GetColumnUseInvertedSelection(ACol) then
|
||||
begin
|
||||
//------------------------------------------------------
|
||||
if IsCursor then
|
||||
if IsCursor OR (IsCursorInactive AND ColumnsSet.GetColumnUseInactiveSelColor(ACol)) then
|
||||
begin
|
||||
TextColor := InvertColor(ColumnsSet.GetColumnCursorText(ACol));
|
||||
end
|
||||
else
|
||||
begin
|
||||
BackgroundColor := ColumnsSet.GetColumnMarkColor(ACol);
|
||||
if ColumnsView.Active OR (not ColumnsSet.GetColumnUseInactiveSelColor(ACol)) then
|
||||
BackgroundColor := ColumnsSet.GetColumnMarkColor(ACol)
|
||||
else
|
||||
BackgroundColor := ColumnsSet.GetColumnInactiveMarkColor(ACol);
|
||||
TextColor := ColumnsSet.GetColumnBackground(ACol);
|
||||
end;
|
||||
//------------------------------------------------------
|
||||
end
|
||||
else
|
||||
begin
|
||||
TextColor := ColumnsSet.GetColumnMarkColor(ACol);
|
||||
if ColumnsView.Active OR (not ColumnsSet.GetColumnUseInactiveSelColor(ACol)) then
|
||||
TextColor := ColumnsSet.GetColumnMarkColor(ACol)
|
||||
else
|
||||
TextColor := ColumnsSet.GetColumnInactiveMarkColor(ACol);
|
||||
end;
|
||||
end
|
||||
else if IsCursor then
|
||||
|
|
@ -1454,7 +1463,7 @@ var
|
|||
TextColor := ColumnsSet.GetColumnCursorText(ACol);
|
||||
end;
|
||||
|
||||
BackgroundColor := ColumnsView.DimColor(BackgroundColor);
|
||||
BackgroundColor := ColumnsOwnDim(BackgroundColor);
|
||||
|
||||
if AFile.RecentlyUpdatedPct <> 0 then
|
||||
begin
|
||||
|
|
@ -1471,9 +1480,12 @@ var
|
|||
procedure DrawLines;
|
||||
begin
|
||||
// Draw frame cursor.
|
||||
if gUseFrameCursor and (gdSelected in aState) and ColumnsView.Active then
|
||||
if ColumnsSet.UseFrameCursor and (gdSelected in aState) and (ColumnsView.Active OR ColumnsSet.GetColumnUseInactiveSelColor(Acol)) then
|
||||
begin
|
||||
Canvas.Pen.Color := ColumnsSet.GetColumnCursorColor(ACol);
|
||||
if ColumnsView.Active then
|
||||
Canvas.Pen.Color := ColumnsSet.GetColumnCursorColor(ACol)
|
||||
else
|
||||
Canvas.Pen.Color := ColumnsSet.GetColumnInactiveCursorColor(ACol);
|
||||
Canvas.Line(aRect.Left, aRect.Top, aRect.Right, aRect.Top);
|
||||
Canvas.Line(aRect.Left, aRect.Bottom - 1, aRect.Right, aRect.Bottom - 1);
|
||||
end;
|
||||
|
|
@ -1560,6 +1572,7 @@ begin
|
|||
MI:=TMenuItem.Create(ColumnsView.pmColumnsMenu);
|
||||
MI.Tag:=I;
|
||||
MI.Caption:=ColSet.Items[I];
|
||||
MI.Checked:=(ColSet.Items[I] = ColumnsView.ActiveColm);
|
||||
MI.OnClick:=@ColumnsView.ColumnsMenuClick;
|
||||
ColumnsView.pmColumnsMenu.Items.Add(MI);
|
||||
end;
|
||||
|
|
@ -1568,12 +1581,6 @@ begin
|
|||
MI:=TMenuItem.Create(ColumnsView.pmColumnsMenu);
|
||||
MI.Caption:='-';
|
||||
ColumnsView.pmColumnsMenu.Items.Add(MI);
|
||||
//Configure this custom columns
|
||||
MI:=TMenuItem.Create(ColumnsView.pmColumnsMenu);
|
||||
MI.Tag:=1000;
|
||||
MI.Caption:=rsMenuConfigureThisCustomColumn;
|
||||
MI.OnClick:=@ColumnsView.ColumnsMenuClick;
|
||||
ColumnsView.pmColumnsMenu.Items.Add(MI);
|
||||
//Configure custom columns
|
||||
MI:=TMenuItem.Create(ColumnsView.pmColumnsMenu);
|
||||
MI.Tag:=1001;
|
||||
|
|
|
|||
|
|
@ -294,22 +294,27 @@ var
|
|||
TextColor: TColor = clDefault;
|
||||
BackgroundColor: TColor;
|
||||
IsCursor: Boolean;
|
||||
IsCursorInactive: Boolean;
|
||||
begin
|
||||
Canvas.Font.Name := gFonts[dcfMain].Name;
|
||||
Canvas.Font.Size := gFonts[dcfMain].Size;
|
||||
Canvas.Font.Style := gFonts[dcfMain].Style;
|
||||
|
||||
IsCursor := (gdSelected in aState) and FFileView.Active and (not gUseFrameCursor);
|
||||
IsCursorInactive := (gdSelected in aState) and (not FFileView.Active) and (not gUseFrameCursor);
|
||||
// Set up default background color first.
|
||||
if IsCursor then
|
||||
BackgroundColor := gCursorColor
|
||||
else
|
||||
begin
|
||||
// Alternate rows background color.
|
||||
if odd(ARow) then
|
||||
BackgroundColor := gBackColor
|
||||
if IsCursorInactive AND gUseInactiveSelColor then
|
||||
BackgroundColor := gInactiveCursorColor
|
||||
else
|
||||
BackgroundColor := gBackColor2;
|
||||
// Alternate rows background color.
|
||||
if odd(ARow) then
|
||||
BackgroundColor := gBackColor
|
||||
else
|
||||
BackgroundColor := gBackColor2;
|
||||
end;
|
||||
|
||||
// Set text color.
|
||||
|
|
@ -322,20 +327,26 @@ begin
|
|||
if gUseInvertedSelection then
|
||||
begin
|
||||
//------------------------------------------------------
|
||||
if IsCursor then
|
||||
if IsCursor OR (IsCursorInactive AND gUseInactiveSelColor) then
|
||||
begin
|
||||
TextColor := InvertColor(gCursorText);
|
||||
end
|
||||
else
|
||||
begin
|
||||
BackgroundColor := gMarkColor;
|
||||
if FFileView.Active OR (not gUseInactiveSelColor) then
|
||||
BackgroundColor := gMarkColor
|
||||
else
|
||||
BackgroundColor := gInactiveMarkColor;
|
||||
TextColor := TextColor;
|
||||
end;
|
||||
//------------------------------------------------------
|
||||
end
|
||||
else
|
||||
begin
|
||||
TextColor := gMarkColor;
|
||||
if FFileView.Active OR (not gUseInactiveSelColor) then
|
||||
TextColor := gMarkColor
|
||||
else
|
||||
TextColor := gInactiveMarkColor;
|
||||
end;
|
||||
end
|
||||
else if IsCursor then
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
341
src/ucolumns.pas
341
src/ucolumns.pas
|
|
@ -4,6 +4,7 @@
|
|||
Filepanel columns implementation unit
|
||||
|
||||
Copyright (C) 2008 Dmitry Kolomiets (B4rr4cuda@rambler.ru)
|
||||
Copyright (C) 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
|
||||
|
|
@ -40,13 +41,17 @@ type
|
|||
FontName: String;
|
||||
FontSize: Integer;
|
||||
FontStyle: TFontStyles;
|
||||
Overcolor: Boolean;
|
||||
TextColor,
|
||||
Background,
|
||||
Background2,
|
||||
MarkColor,
|
||||
CursorColor,
|
||||
CursorText: TColor;
|
||||
CursorText,
|
||||
InactiveCursorColor,
|
||||
InactiveMarkColor: TColor;
|
||||
UseInvertedSelection: Boolean;
|
||||
UseInactiveSelColor: Boolean;
|
||||
Overcolor: Boolean;
|
||||
public
|
||||
constructor Create;
|
||||
end;
|
||||
|
|
@ -72,13 +77,17 @@ type
|
|||
FontName: String;
|
||||
FontSize: Integer;
|
||||
FontStyle: TFontStyles;
|
||||
Overcolor: Boolean;
|
||||
TextColor,
|
||||
Background,
|
||||
Background2,
|
||||
MarkColor,
|
||||
CursorColor,
|
||||
CursorText: TColor;
|
||||
CursorText,
|
||||
InactiveCursorColor,
|
||||
InactiveMarkColor: TColor;
|
||||
UseInvertedSelection: Boolean;
|
||||
UseInactiveSelColor: Boolean;
|
||||
Overcolor: Boolean;
|
||||
//---------------------
|
||||
|
||||
constructor Create;
|
||||
|
|
@ -108,6 +117,7 @@ type
|
|||
FCustomView: Boolean;
|
||||
FCursorBorder: Boolean;
|
||||
FCursorBorderColor: TColor;
|
||||
FUseFrameCursor: Boolean;
|
||||
//------------------------------------------------------
|
||||
public
|
||||
constructor Create;
|
||||
|
|
@ -123,19 +133,20 @@ type
|
|||
function GetColumnFontName(const Index: Integer): String;
|
||||
function GetColumnFontSize(const Index: Integer): Integer;
|
||||
function GetColumnFontStyle(const Index: Integer): TFontStyles;
|
||||
function GetColumnOvercolor(const Index: Integer): Boolean;
|
||||
function GetColumnTextColor(const Index: Integer): TColor;
|
||||
function GetColumnBackground(const Index: Integer): TColor;
|
||||
function GetColumnBackground2(const Index: Integer): TColor;
|
||||
function GetColumnMarkColor(const Index: Integer): TColor;
|
||||
function GetColumnCursorColor(const Index: Integer): TColor;
|
||||
function GetColumnCursorText(const Index: Integer): TColor;
|
||||
function GetColumnInactiveCursorColor(const Index: Integer): TColor;
|
||||
function GetColumnInactiveMarkColor(const Index: Integer): TColor;
|
||||
function GetColumnUseInvertedSelection(const Index: Integer): Boolean;
|
||||
function GetColumnUseInactiveSelColor(const Index: Integer): Boolean;
|
||||
function GetColumnOvercolor(const Index: Integer): Boolean;
|
||||
//---------------------
|
||||
function GetColumnPrm(const Index: Integer): TColPrm;
|
||||
//---------------------
|
||||
function GetCursorBorder: Boolean;
|
||||
function GetCursorBorderColor: TColor;
|
||||
//---------------------
|
||||
function GetColumnItem(const Index: Integer): TPanelColumn;
|
||||
function GetColumnItemResultString(const Index: Integer;
|
||||
const AFile: TFile; const AFileSource: IFileSource): String;
|
||||
|
|
@ -158,28 +169,34 @@ type
|
|||
procedure SetColumnMarkColor(const Index: Integer; Value: TColor);
|
||||
procedure SetColumnCursorColor(const Index: Integer; Value: TColor);
|
||||
procedure SetColumnCursorText(const Index: Integer; Value: TColor);
|
||||
procedure SetColumnInactiveCursorColor(const Index: Integer; Value: TColor);
|
||||
procedure SetColumnInactiveMarkColor(const Index: Integer; Value: TColor);
|
||||
procedure SetColumnUseInvertedSelection(const Index: Integer; Value: Boolean);
|
||||
procedure SetColumnUseInactiveSelColor(const Index: Integer; Value: Boolean);
|
||||
procedure SetColumnOvercolor(const Index: Integer; Value: Boolean);
|
||||
procedure SetColumnPrm(const Index: Integer; Value: TColPrm);
|
||||
//---------------------
|
||||
procedure SetCursorBorder(ShowBorder: Boolean);
|
||||
procedure SetCursorBorderColor(Color: TColor);
|
||||
procedure SetColumnPrm(const Index: Integer; Value: TColPrm);
|
||||
//---------------------
|
||||
procedure Delete(const Index: Integer);
|
||||
procedure Clear;
|
||||
procedure AddDefaultColumns;
|
||||
procedure AddDefaultEverything;
|
||||
//---------------------
|
||||
procedure Load(Ini: TIniFileEx; SetName: String); overload;
|
||||
procedure Load(AConfig: TXmlConfig; ANode: TXmlNode); overload;
|
||||
//---------------------
|
||||
procedure Save(Ini: TIniFileEx; ASetName: String); overload;
|
||||
procedure Save(AConfig: TXmlConfig; ANode: TXmlNode); overload;
|
||||
//---------------------
|
||||
function GetSignature:dword;
|
||||
property ColumnsCount: Integer read GetCount;
|
||||
property Count: Integer read GetCount;
|
||||
property CustomView: Boolean read FCustomView write FCustomView;
|
||||
property CurrentColumnsSetName: String read fSetName write fSetName;
|
||||
property SetName: String read fSetName write fSetName;
|
||||
property Name: String read fSetName write fSetName;
|
||||
property UseCursorBorder: boolean read FCursorBorder write FCursorBorder;
|
||||
property CursorBorderColor: TColor read FCursorBorderColor write FCursorBorderColor;
|
||||
property UseFrameCursor: boolean read FUseFrameCursor write FUseFrameCursor;
|
||||
//------------------------------------------------------
|
||||
end;
|
||||
|
||||
|
|
@ -196,7 +213,6 @@ type
|
|||
procedure Clear;
|
||||
procedure Load(Ini: TIniFileEx); overload;
|
||||
procedure Load(AConfig: TXmlConfig; ANode: TXmlNode); overload;
|
||||
procedure Save(Ini: TIniFileEx); overload;
|
||||
procedure Save(AConfig: TXmlConfig; ANode: TXmlNode); overload;
|
||||
function Add(Item: TPanelColumnsClass): Integer;
|
||||
procedure Insert(AIndex: Integer; Item: TPanelColumnsClass);
|
||||
|
|
@ -215,7 +231,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
uDebug, uLng, uGlobs;
|
||||
crc, uDebug, uLng, uGlobs;
|
||||
|
||||
function StrToAlign(str: String): TAlignment;
|
||||
begin
|
||||
|
|
@ -295,14 +311,6 @@ begin
|
|||
Result := gFonts[dcfMain].Style;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnOvercolor(const Index: Integer): Boolean;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).Overcolor
|
||||
else
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnTextColor(const Index: Integer): TColor;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
|
|
@ -351,32 +359,66 @@ begin
|
|||
Result := gCursorText;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnInactiveCursorColor(const Index: Integer): TColor;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).InactiveCursorColor
|
||||
else
|
||||
Result := gInactiveCursorColor;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnInactiveMarkColor(const Index: Integer): TColor;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).InactiveMarkColor
|
||||
else
|
||||
Result := gInactiveMarkColor;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnUseInvertedSelection(const Index: Integer): Boolean;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).UseInvertedSelection
|
||||
else
|
||||
Result := gUseInvertedSelection;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnUseInactiveSelColor(const Index: Integer): Boolean;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).UseInactiveSelColor
|
||||
else
|
||||
Result := gUseInactiveSelColor;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnOvercolor(const Index: Integer): Boolean;
|
||||
begin
|
||||
if FCustomView and (Index < Flist.Count) then
|
||||
Result := TPanelColumn(Flist[Index]).Overcolor
|
||||
else
|
||||
Result := gAllowOverColor;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnPrm(const Index: Integer): TColPrm;
|
||||
begin
|
||||
if Index >= Flist.Count then
|
||||
Exit(nil);
|
||||
|
||||
Result := TColPrm.Create;
|
||||
Result.Overcolor := GetColumnOvercolor(Index);
|
||||
Result.Background := GetColumnBackground(Index);
|
||||
Result.Background2 := GetColumnBackground2(Index);
|
||||
Result.CursorColor := GetColumnCursorColor(Index);
|
||||
Result.CursorText := GetColumnCursorText(Index);
|
||||
Result.FontName := GetColumnFontName(Index);
|
||||
Result.FontSize := GetColumnFontSize(Index);
|
||||
Result.FontStyle := GetColumnFontStyle(Index);
|
||||
Result.MarkColor := GetColumnMarkColor(Index);
|
||||
Result.TextColor := GetColumnTextColor(Index);
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetCursorBorder: Boolean;
|
||||
begin
|
||||
Result := FCursorBorder;
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetCursorBorderColor: TColor;
|
||||
begin
|
||||
Result := FCursorBorderColor;
|
||||
Result.Background := GetColumnBackground(Index);
|
||||
Result.Background2 := GetColumnBackground2(Index);
|
||||
Result.MarkColor := GetColumnMarkColor(Index);
|
||||
Result.CursorColor := GetColumnCursorColor(Index);
|
||||
Result.CursorText := GetColumnCursorText(Index);
|
||||
Result.InactiveCursorColor := GetColumnInactiveCursorColor(Index);
|
||||
Result.InactiveMarkColor := GetColumnMarkColor(Index);
|
||||
Result.UseInvertedSelection:= GetColumnUseInvertedSelection(Index);
|
||||
Result.UseInactiveSelColor:= GetColumnUseInactiveSelColor(Index);
|
||||
Result.Overcolor := GetColumnOvercolor(Index);
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetColumnItem(const Index: Integer): TPanelColumn;
|
||||
|
|
@ -429,6 +471,7 @@ begin
|
|||
FCustomView := OtherColumnsClass.FCustomView;
|
||||
FCursorBorder := OtherColumnsClass.FCursorBorder;
|
||||
FCursorBorderColor := OtherColumnsClass.FCursorBorderColor;
|
||||
FUseFrameCursor := OtherColumnsClass.FUseFrameCursor;
|
||||
|
||||
for i := 0 to OtherColumnsClass.ColumnsCount - 1 do
|
||||
begin
|
||||
|
|
@ -443,13 +486,17 @@ begin
|
|||
NewColumn.FontName := OldColumn.FontName;
|
||||
NewColumn.FontSize := OldColumn.FontSize;
|
||||
NewColumn.FontStyle := OldColumn.FontStyle;
|
||||
NewColumn.Overcolor := OldColumn.Overcolor;
|
||||
NewColumn.TextColor := OldColumn.TextColor;
|
||||
NewColumn.Background := OldColumn.Background;
|
||||
NewColumn.Background2 := OldColumn.Background2;
|
||||
NewColumn.MarkColor := OldColumn.MarkColor;
|
||||
NewColumn.CursorColor := OldColumn.CursorColor;
|
||||
NewColumn.CursorText := OldColumn.CursorText;
|
||||
NewColumn.InactiveCursorColor := OldColumn.InactiveCursorColor;
|
||||
NewColumn.InactiveMarkColor := OldColumn.InactiveMarkColor;
|
||||
NewColumn.UseInvertedSelection := OldColumn.UseInvertedSelection;
|
||||
NewColumn.UseInactiveSelColor := OldColumn.UseInactiveSelColor;
|
||||
NewColumn.Overcolor := OldColumn.Overcolor;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -478,13 +525,17 @@ begin
|
|||
AColumn.FontName := gFonts[dcfMain].Name;
|
||||
AColumn.FontSize := gFonts[dcfMain].Size;
|
||||
AColumn.FontStyle := gFonts[dcfMain].Style;
|
||||
AColumn.Overcolor := True;
|
||||
AColumn.TextColor := gForeColor;
|
||||
AColumn.Background := gBackColor;
|
||||
AColumn.Background2 := gBackColor2;
|
||||
AColumn.MarkColor := gMarkColor;
|
||||
AColumn.CursorColor := gCursorColor;
|
||||
AColumn.CursorText := gCursorText;
|
||||
AColumn.InactiveCursorColor := gInactiveCursorColor;
|
||||
AColumn.InactiveMarkColor := gInactiveMarkColor;
|
||||
AColumn.UseInvertedSelection := gUseInvertedSelection;
|
||||
AColumn.UseInactiveSelColor := gUseInactiveSelColor;
|
||||
AColumn.Overcolor := gAllowOverColor;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnTitle(const Index: Integer; Title: String);
|
||||
|
|
@ -578,6 +629,34 @@ begin
|
|||
TPanelColumn(Flist[Index]).CursorText := Value;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnInactiveCursorColor(const Index: Integer; Value: TColor);
|
||||
begin
|
||||
if Index > Flist.Count then
|
||||
Exit;
|
||||
TPanelColumn(Flist[Index]).InactiveCursorColor := Value;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnInactiveMarkColor(const Index: Integer; Value: TColor);
|
||||
begin
|
||||
if Index > Flist.Count then
|
||||
Exit;
|
||||
TPanelColumn(Flist[Index]).InactiveMarkColor := Value;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnUseInvertedSelection(const Index: Integer; Value: Boolean);
|
||||
begin
|
||||
if Index > Flist.Count then
|
||||
Exit;
|
||||
TPanelColumn(Flist[Index]).UseInvertedSelection := Value;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnUseInactiveSelColor(const Index: Integer; Value: Boolean);
|
||||
begin
|
||||
if Index > Flist.Count then
|
||||
Exit;
|
||||
TPanelColumn(Flist[Index]).UseInactiveSelColor := Value;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetColumnOvercolor(const Index: Integer; Value: Boolean);
|
||||
begin
|
||||
if Index > Flist.Count then
|
||||
|
|
@ -589,28 +668,22 @@ procedure TPanelColumnsClass.SetColumnPrm(const Index: Integer; Value: TColPrm);
|
|||
begin
|
||||
if Index >= Flist.Count then
|
||||
Exit;
|
||||
SetColumnBackground(Index, Value.Background);
|
||||
SetColumnBackground2(Index, Value.Background2);
|
||||
SetColumnCursorColor(Index, Value.CursorColor);
|
||||
SetColumnCursorText(Index, Value.CursorText);
|
||||
SetColumnFontName(Index, Value.FontName);
|
||||
SetColumnFontSize(Index, Value.FontSize);
|
||||
SetColumnFontStyle(Index, Value.FontStyle);
|
||||
SetColumnMarkColor(Index, Value.MarkColor);
|
||||
SetColumnTextColor(Index, Value.TextColor);
|
||||
SetColumnBackground(Index, Value.Background);
|
||||
SetColumnBackground2(Index, Value.Background2);
|
||||
SetColumnMarkColor(Index, Value.MarkColor);
|
||||
SetColumnCursorColor(Index, Value.CursorColor);
|
||||
SetColumnCursorText(Index, Value.CursorText);
|
||||
SetColumnInactiveCursorColor(Index, Value.InactiveCursorColor);
|
||||
SetColumnInactiveMarkColor(Index, Value.InactiveMarkColor);
|
||||
SetColumnUseInvertedSelection(Index, Value.UseInvertedSelection);
|
||||
SetColumnUseInactiveSelColor(Index, Value.UseInactiveSelColor);
|
||||
SetColumnOvercolor(Index, Value.Overcolor);
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetCursorBorder(ShowBorder: Boolean);
|
||||
begin
|
||||
FCursorBorder := ShowBorder;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.SetCursorBorderColor(Color: TColor);
|
||||
begin
|
||||
FCursorBorderColor := Color;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.AddDefaultColumns;
|
||||
var
|
||||
DCFunc: String;
|
||||
|
|
@ -629,6 +702,15 @@ begin
|
|||
Add(rsColAttr, Format(DCFunc, [TFileFunctionStrings[fsfAttr]]), 175, taLeftJustify);
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.AddDefaultEverything;
|
||||
begin
|
||||
AddDefaultColumns;
|
||||
FCustomView := True;
|
||||
FCursorBorder := gUseCursorBorder;
|
||||
FCursorBorderColor := gCursorBorderColor;
|
||||
FUseFrameCursor := gUseFrameCursor;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.Load(Ini: TIniFileEx; SetName: String);
|
||||
var
|
||||
aCount, I: Integer;
|
||||
|
|
@ -654,19 +736,24 @@ begin
|
|||
TPanelColumn(FList[I]).FontName:=Ini.ReadString(fSetName,'Column'+IntToStr(I+1)+'FontName',gFonts[dcfMain].Name);
|
||||
TPanelColumn(FList[I]).FontSize:=Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'FontSize',gFonts[dcfMain].Size);
|
||||
TPanelColumn(FList[I]).FontStyle:=TFontStyles(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'FontStyle',Integer(gFonts[dcfMain].Style)));
|
||||
TPanelColumn(FList[I]).Overcolor:=Ini.ReadBool(fSetName,'Column'+IntToStr(I+1)+'Overcolor',true );
|
||||
TPanelColumn(FList[I]).TextColor:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'TextColor',gForeColor));
|
||||
TPanelColumn(FList[I]).Background:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'Background',gBackColor ));
|
||||
TPanelColumn(FList[I]).Background2:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'Background2',gBackColor2 ));
|
||||
TPanelColumn(FList[I]).MarkColor:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'MarkColor',gMarkColor ));
|
||||
TPanelColumn(FList[I]).CursorColor:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'CursorColor',gCursorColor ));
|
||||
TPanelColumn(FList[I]).CursorText:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'CursorText',gCursorText ));
|
||||
TPanelColumn(FList[I]).InactiveCursorColor:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'InactiveCursorColor',gInactiveCursorColor));
|
||||
TPanelColumn(FList[I]).InactiveMarkColor:=Tcolor(Ini.ReadInteger(fSetName,'Column'+IntToStr(I+1)+'InactiveMarkColor',gInactiveMarkColor ));
|
||||
TPanelColumn(FList[I]).UseInvertedSelection:=Ini.ReadBool(fSetName,'Column'+IntToStr(I+1)+'UseInvertedSelection',true );
|
||||
TPanelColumn(FList[I]).UseInactiveSelColor:=Ini.ReadBool(fSetName,'Column'+IntToStr(I+1)+'UseInactiveSelColor',gUseInactiveSelColor);
|
||||
TPanelColumn(FList[I]).Overcolor:=Ini.ReadBool(fSetName,'Column'+IntToStr(I+1)+'Overcolor',true );
|
||||
//---------------------
|
||||
end;
|
||||
//---------------------
|
||||
FCustomView := Ini.ReadBool(fSetName, 'CustomView', False);
|
||||
SetCursorBorder(Ini.ReadBool(fSetName, 'CursorBorder', False));
|
||||
SetCursorBorderColor(TColor(Ini.ReadInteger(fSetName, 'CursorBorderColor', gCursorColor)));
|
||||
FCursorBorder := Ini.ReadBool(fSetName, 'CursorBorder', gUseCursorBorder);
|
||||
FCursorBorderColor := TColor(Ini.ReadInteger(fSetName, 'CursorBorderColor', gCursorBorderColor));
|
||||
FUseFrameCursor := Ini.ReadBool(fSetName, 'UseFrameCursor', gUseFrameCursor);
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.Load(AConfig: TXmlConfig; ANode: TXmlNode);
|
||||
|
|
@ -675,8 +762,9 @@ var
|
|||
SubNode: TXmlNode;
|
||||
begin
|
||||
FCustomView := AConfig.GetValue(ANode, 'CustomView', False);
|
||||
SetCursorBorder(AConfig.GetAttr(ANode, 'CursorBorder/Enabled', False));
|
||||
SetCursorBorderColor(TColor(AConfig.GetValue(ANode, 'CursorBorder/Color', gCursorColor)));
|
||||
FCursorBorder := AConfig.GetAttr(ANode, 'CursorBorder/Enabled', gUseCursorBorder);
|
||||
FCursorBorderColor := TColor(AConfig.GetValue(ANode, 'CursorBorder/Color', gCursorBorderColor));
|
||||
FUseFrameCursor := AConfig.GetAttr(ANode, 'UseFrameCursor', gUseFrameCursor);
|
||||
|
||||
Clear;
|
||||
|
||||
|
|
@ -697,13 +785,17 @@ begin
|
|||
AColumn.Align := TAlignment(AConfig.GetValue(SubNode, 'Align', Integer(0)));
|
||||
AConfig.GetFont(SubNode, 'Font', AColumn.FontName, AColumn.FontSize, Integer(AColumn.FontStyle),
|
||||
gFonts[dcfMain].Name, gFonts[dcfMain].Size, Integer(gFonts[dcfMain].Style));
|
||||
AColumn.Overcolor := AConfig.GetValue(SubNode, 'Overcolor', True);
|
||||
AColumn.TextColor := TColor(AConfig.GetValue(SubNode, 'TextColor', gForeColor));
|
||||
AColumn.Background := TColor(AConfig.GetValue(SubNode, 'Background', gBackColor));
|
||||
AColumn.Background2 := TColor(AConfig.GetValue(SubNode, 'Background2', gBackColor2));
|
||||
AColumn.MarkColor := TColor(AConfig.GetValue(SubNode, 'MarkColor', gMarkColor));
|
||||
AColumn.CursorColor := TColor(AConfig.GetValue(SubNode, 'CursorColor', gCursorColor));
|
||||
AColumn.CursorText := TColor(AConfig.GetValue(SubNode, 'CursorText', gCursorText));
|
||||
AColumn.InactiveCursorColor := TColor(AConfig.GetValue(SubNode, 'InactiveCursorColor', gInactiveCursorColor));
|
||||
AColumn.InactiveMarkColor := TColor(AConfig.GetValue(SubNode, 'InactiveMarkColor', gInactiveMarkColor));
|
||||
AColumn.UseInvertedSelection := AConfig.GetValue(SubNode, 'UseInvertedSelection', gUseInvertedSelection);
|
||||
AColumn.UseInactiveSelColor := AConfig.GetValue(SubNode, 'UseInactiveSelColor', gUseInactiveSelColor);
|
||||
AColumn.Overcolor := AConfig.GetValue(SubNode, 'Overcolor', True);
|
||||
end;
|
||||
SubNode := SubNode.NextSibling;
|
||||
end;
|
||||
|
|
@ -713,47 +805,6 @@ begin
|
|||
AddDefaultColumns;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.Save(Ini: TIniFileEx; ASetName: String);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
fSetName := ASetName;
|
||||
if fSetName = '' then
|
||||
Exit;
|
||||
Ini.EraseSection(fSetName);
|
||||
Ini.WriteInteger(fSetName, 'ColumnCount', FList.Count);
|
||||
for I := 0 to FList.Count - 1 do
|
||||
begin
|
||||
Ini.WriteString(fSetName,'Column'+IntToStr(I+1)+'Title',TPanelColumn(FList[I]).Title);
|
||||
Ini.WriteString(fSetName,'Column'+IntToStr(I+1)+'FuncsString',TPanelColumn(FList[I]).FuncString);
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'Width', TPanelColumn(FList[I]).Width);
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'Align', Integer(TPanelColumn(FList[I]).Align));
|
||||
//---------------------
|
||||
Ini.WriteString(fSetName,'Column'+IntToStr(I+1)+'FontName',TPanelColumn(FList[I]).FontName);
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'FontSize', TPanelColumn(FList[I]).FontSize);
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'FontStyle', Integer(TPanelColumn(FList[I]).FontStyle));
|
||||
Ini.WriteBool(fSetName,'Column'+IntToStr(I+1)+'Overcolor', TPanelColumn(FList[I]).Overcolor);
|
||||
|
||||
if TPanelColumn(FList[I]).TextColor <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'TextColor', TPanelColumn(FList[I]).TextColor);
|
||||
if TPanelColumn(FList[I]).Background <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'Background', TPanelColumn(FList[I]).Background);
|
||||
if TPanelColumn(FList[I]).Background2 <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'Background2', TPanelColumn(FList[I]).Background2);
|
||||
if TPanelColumn(FList[I]).MarkColor <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'MarkColor', TPanelColumn(FList[I]).MarkColor);
|
||||
if TPanelColumn(FList[I]).CursorColor <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'CursorColor', TPanelColumn(FList[I]).CursorColor);
|
||||
if TPanelColumn(FList[I]).CursorText <>clNone then
|
||||
Ini.WriteInteger(fSetName,'Column'+IntToStr(I+1)+'CursorText', TPanelColumn(FList[I]).CursorText);
|
||||
end;
|
||||
|
||||
Ini.WriteBool(fSetName, 'CustomView', FCustomView);
|
||||
Ini.WriteBool(fSetName, 'CursorBorder', GetCursorBorder);
|
||||
if GetCursorBorderColor <> clNone then
|
||||
Ini.WriteInteger(fSetName, 'CursorBorderColor', GetCursorBorderColor);
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsClass.Save(AConfig: TXmlConfig; ANode: TXmlNode);
|
||||
var
|
||||
I: Integer;
|
||||
|
|
@ -761,9 +812,10 @@ var
|
|||
AColumn: TPanelColumn;
|
||||
begin
|
||||
AConfig.SetValue(ANode, 'CustomView', FCustomView);
|
||||
AConfig.SetAttr(ANode, 'CursorBorder/Enabled', GetCursorBorder);
|
||||
if GetCursorBorderColor <> clNone then
|
||||
AConfig.SetValue(ANode, 'CursorBorder/Color', GetCursorBorderColor);
|
||||
AConfig.SetAttr(ANode, 'CursorBorder/Enabled', FCursorBorder);
|
||||
if FCursorBorderColor <> clNone then
|
||||
AConfig.SetValue(ANode, 'CursorBorder/Color', FCursorBorderColor);
|
||||
AConfig.SetAttr(ANode, 'UseFrameCursor', FUseFrameCursor);
|
||||
|
||||
ANode := AConfig.FindNode(ANode, 'Columns', True);
|
||||
AConfig.ClearNode(ANode);
|
||||
|
|
@ -777,9 +829,7 @@ begin
|
|||
AConfig.AddValue(SubNode, 'FuncString', AColumn.FuncString);
|
||||
AConfig.AddValue(SubNode, 'Width', AColumn.Width);
|
||||
AConfig.AddValue(SubNode, 'Align', Integer(AColumn.Align));
|
||||
AConfig.SetFont(SubNode, 'Font', AColumn.FontName,
|
||||
AColumn.FontSize, Integer(AColumn.FontStyle));
|
||||
AConfig.AddValue(SubNode, 'Overcolor', AColumn.Overcolor);
|
||||
AConfig.SetFont(SubNode, 'Font', AColumn.FontName, AColumn.FontSize, Integer(AColumn.FontStyle));
|
||||
|
||||
if AColumn.TextColor <> clNone then
|
||||
AConfig.AddValue(SubNode, 'TextColor', AColumn.TextColor);
|
||||
|
|
@ -793,6 +843,14 @@ begin
|
|||
AConfig.AddValue(SubNode, 'CursorColor', AColumn.CursorColor);
|
||||
if AColumn.CursorText <> clNone then
|
||||
AConfig.AddValue(SubNode, 'CursorText', AColumn.CursorText);
|
||||
if AColumn.InactiveCursorColor <> clNone then
|
||||
AConfig.AddValue(SubNode, 'InactiveCursorColor', AColumn.InactiveCursorColor);
|
||||
if AColumn.InactiveMarkColor <> clNone then
|
||||
AConfig.AddValue(SubNode, 'InactiveMarkColor', AColumn.InactiveMarkColor);
|
||||
|
||||
AConfig.AddValue(SubNode, 'UseInvertedSelection', AColumn.UseInvertedSelection);
|
||||
AConfig.AddValue(SubNode, 'UseInactiveSelColor', AColumn.UseInactiveSelColor);
|
||||
AConfig.AddValue(SubNode, 'Overcolor', AColumn.Overcolor);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -804,6 +862,54 @@ begin
|
|||
FList.Delete(Index);
|
||||
end;
|
||||
|
||||
function TPanelColumnsClass.GetSignature:dword;
|
||||
procedure ProgressSignatureWithThisString(sSomething:string);
|
||||
begin
|
||||
if length(sSomething) > 0 then
|
||||
Result := crc32(Result, @sSomething[1], length(sSomething));
|
||||
end;
|
||||
|
||||
var
|
||||
iPanelColumnIndex: integer;
|
||||
iFunction: integer;
|
||||
begin
|
||||
result:=$00000000;
|
||||
|
||||
for iPanelColumnIndex := 0 to pred(Count) do
|
||||
begin
|
||||
with TPanelColumn(Flist[iPanelColumnIndex]) do
|
||||
begin
|
||||
ProgressSignatureWithThisString(Title);
|
||||
for iFunction:=0 to pred(FuncList.Count) do ProgressSignatureWithThisString(FuncList.Strings[iFunction]);
|
||||
Result := crc32(Result, @Width, sizeof(Width));
|
||||
Result := crc32(Result, @Align, sizeof(Align));
|
||||
if FCustomView then
|
||||
begin
|
||||
ProgressSignatureWithThisString(FontName);
|
||||
Result := crc32(Result, @FontSize, sizeof(FontSize));
|
||||
Result := crc32(Result, @FontStyle, sizeof(FontStyle));
|
||||
Result := crc32(Result, @TextColor, sizeof(TextColor));
|
||||
Result := crc32(Result, @Background, sizeof(Background));
|
||||
Result := crc32(Result, @Background2, sizeof(Background2));
|
||||
Result := crc32(Result, @MarkColor, sizeof(MarkColor));
|
||||
Result := crc32(Result, @CursorColor, sizeof(CursorColor));
|
||||
Result := crc32(Result, @CursorText, sizeof(CursorText));
|
||||
Result := crc32(Result, @InactiveCursorColor, sizeof(InactiveCursorColor));
|
||||
Result := crc32(Result, @InactiveMarkColor, sizeof(InactiveMarkColor));
|
||||
Result := crc32(Result, @UseInvertedSelection, sizeof(UseInvertedSelection));
|
||||
Result := crc32(Result, @UseInactiveSelColor, sizeof(UseInactiveSelColor));
|
||||
Result := crc32(Result, @Overcolor, sizeof(Overcolor));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
ProgressSignatureWithThisString(fSetName);
|
||||
Result := crc32(Result, @FCustomView, sizeof(FCustomView));
|
||||
Result := crc32(Result, @FCursorBorder, sizeof(FCursorBorder));
|
||||
Result := crc32(Result, @FCursorBorderColor, sizeof(FCursorBorderColor));
|
||||
Result := crc32(Result, @FUseFrameCursor, sizeof(FUseFrameCursor));
|
||||
end;
|
||||
|
||||
{ TPanelColumn }
|
||||
|
||||
constructor TPanelColumn.Create;
|
||||
|
|
@ -981,19 +1087,6 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsList.Save(Ini: TIniFileEx);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Ini.EraseSection('ColumnsSet');
|
||||
Ini.WriteInteger('ColumnsSet', 'ColumnsSetCount', FSet.Count);
|
||||
for I := 0 to FSet.Count - 1 do
|
||||
begin
|
||||
Ini.WriteString('ColumnsSet', 'ColumnsSet' + IntToStr(I + 1) + 'Name', FSet[i]);
|
||||
TPanelColumnsClass(Fset.Objects[i]).Save(ini, FSet[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPanelColumnsList.Save(AConfig: TXmlConfig; ANode: TXmlNode);
|
||||
var
|
||||
I: Integer;
|
||||
|
|
@ -1094,7 +1187,6 @@ end;
|
|||
|
||||
constructor TColPrm.Create;
|
||||
begin
|
||||
Self.Overcolor := True;
|
||||
Self.FontName := gFonts[dcfMain].Name;
|
||||
Self.FontSize := gFonts[dcfMain].Size;
|
||||
Self.FontStyle := gFonts[dcfMain].Style;
|
||||
|
|
@ -1104,6 +1196,11 @@ begin
|
|||
Self.MarkColor := gMarkColor;
|
||||
Self.CursorColor := gCursorColor;
|
||||
Self.CursorText := gCursorText;
|
||||
Self.InactiveCursorColor := gInactiveCursorColor;
|
||||
Self.InactiveMarkColor := gInactiveMarkColor;
|
||||
Self.UseInvertedSelection:= gUseInvertedSelection;
|
||||
Self.UseInactiveSelColor:= gUseInactiveSelColor;
|
||||
Self.Overcolor := gAllowOverColor;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue