mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Additional color settings
This commit is contained in:
parent
a15f42b182
commit
71eb345989
14 changed files with 996 additions and 567 deletions
|
|
@ -46,6 +46,8 @@ type
|
|||
|
||||
procedure ShowPathEdit;
|
||||
procedure SetActive(bActive: Boolean);
|
||||
|
||||
property PathLabel: TPathLabel read FPathLabel;
|
||||
end;
|
||||
|
||||
{ TFileViewFixedHeader }
|
||||
|
|
|
|||
|
|
@ -1,37 +1,482 @@
|
|||
inherited frmOptionsColors: TfrmOptionsColors
|
||||
Height = 451
|
||||
Width = 579
|
||||
HelpKeyword = '/configuration.html#ConfigColor'
|
||||
AutoSize = True
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
DesignLeft = 360
|
||||
DesignTop = 145
|
||||
object rgDarkMode: TRadioGroup[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
ClientHeight = 451
|
||||
ClientWidth = 579
|
||||
DesignLeft = 574
|
||||
DesignTop = 216
|
||||
object cmbGroup: TComboBox[0]
|
||||
AnchorSideLeft.Control = lblCategory
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 58
|
||||
Top = 6
|
||||
Width = 308
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
Caption = 'Dark mode'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 38
|
||||
ClientWidth = 304
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Auto'
|
||||
'Enabled'
|
||||
'Disabled'
|
||||
)
|
||||
Left = 87
|
||||
Height = 23
|
||||
Top = 12
|
||||
Width = 212
|
||||
BorderSpacing.Left = 18
|
||||
BorderSpacing.Top = 12
|
||||
ItemHeight = 15
|
||||
OnChange = cmbGroupChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 0
|
||||
end
|
||||
object nbColors: TNotebook[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cmbGroup
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 115
|
||||
Top = 45
|
||||
Width = 567
|
||||
PageIndex = 0
|
||||
AutoSize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 10
|
||||
TabOrder = 1
|
||||
object pgViewer: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 12
|
||||
ChildSizing.HorizontalSpacing = 8
|
||||
ChildSizing.VerticalSpacing = 8
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
object dbBookMode: TDividerBevel
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 240
|
||||
Caption = 'Book Mode'
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object DividerBevel9: TDividerBevel
|
||||
Left = 260
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 240
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object lblBookText: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 35
|
||||
Width = 240
|
||||
Caption = 'Text:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbBookText: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 35
|
||||
Width = 240
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblBookBackground: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 68
|
||||
Width = 240
|
||||
Caption = 'Background:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbBookBackground: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 68
|
||||
Width = 240
|
||||
TabOrder = 1
|
||||
end
|
||||
object dbImageMode: TDividerBevel
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 101
|
||||
Width = 240
|
||||
Caption = 'Image Mode'
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object DividerBevel11: TDividerBevel
|
||||
Left = 260
|
||||
Height = 15
|
||||
Top = 101
|
||||
Width = 240
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object lblImageBackground1: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 124
|
||||
Width = 240
|
||||
Caption = 'Background 1:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbImageBackground1: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 124
|
||||
Width = 240
|
||||
TabOrder = 2
|
||||
end
|
||||
object lblImageBackground2: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 157
|
||||
Width = 240
|
||||
Caption = 'Background 2:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbImageBackground2: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 157
|
||||
Width = 240
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object pgDiffer: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 12
|
||||
ChildSizing.HorizontalSpacing = 8
|
||||
ChildSizing.VerticalSpacing = 8
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
object dbTextMode: TDividerBevel
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 240
|
||||
Caption = 'Text Mode'
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object DividerBevel4: TDividerBevel
|
||||
Left = 260
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 240
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object lblAdded: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 35
|
||||
Width = 240
|
||||
Caption = 'Added:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbAdded: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 35
|
||||
Width = 240
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblDeleted: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 68
|
||||
Width = 240
|
||||
Caption = 'Deleted:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbDeleted: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 68
|
||||
Width = 240
|
||||
TabOrder = 1
|
||||
end
|
||||
object lblModified: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 101
|
||||
Width = 240
|
||||
Caption = 'Modified:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbModified: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 101
|
||||
Width = 240
|
||||
TabOrder = 2
|
||||
end
|
||||
object dbBinaryMode: TDividerBevel
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 134
|
||||
Width = 240
|
||||
Caption = 'Binary Mode'
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object DividerBevel6: TDividerBevel
|
||||
Left = 260
|
||||
Height = 15
|
||||
Top = 134
|
||||
Width = 240
|
||||
ParentFont = False
|
||||
Style = gsHorLines
|
||||
end
|
||||
object lblModifiedBinary: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 157
|
||||
Width = 240
|
||||
Caption = 'Modified:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbModifiedBinary: TKASColorBoxButton
|
||||
Left = 260
|
||||
Height = 25
|
||||
Top = 157
|
||||
Width = 240
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object pgLog: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 12
|
||||
ChildSizing.HorizontalSpacing = 8
|
||||
ChildSizing.VerticalSpacing = 8
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
object lblInformation: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 66
|
||||
Caption = 'Information:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbInformation: TKASColorBoxButton
|
||||
Left = 86
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 125
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblSuccess: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 45
|
||||
Width = 66
|
||||
Caption = 'Success:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbSuccess: TKASColorBoxButton
|
||||
Left = 86
|
||||
Height = 25
|
||||
Top = 45
|
||||
Width = 125
|
||||
TabOrder = 1
|
||||
end
|
||||
object lblError: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 66
|
||||
Caption = 'Error:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbError: TKASColorBoxButton
|
||||
Left = 86
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 125
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object pgSyncDirs: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 12
|
||||
ChildSizing.HorizontalSpacing = 8
|
||||
ChildSizing.VerticalSpacing = 8
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
object lblLeft: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 54
|
||||
Caption = 'Left:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbLeft: TKASColorBoxButton
|
||||
Left = 74
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 125
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblRight: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 45
|
||||
Width = 54
|
||||
Caption = 'Right:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbRight: TKASColorBoxButton
|
||||
Left = 74
|
||||
Height = 25
|
||||
Top = 45
|
||||
Width = 125
|
||||
TabOrder = 1
|
||||
end
|
||||
object lblUnknown: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 54
|
||||
Caption = 'Unknown:'
|
||||
Layout = tlCenter
|
||||
end
|
||||
object cbUnknown: TKASColorBoxButton
|
||||
Left = 74
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 125
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object pgDriveFreeInd: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
ChildSizing.TopBottomSpacing = 12
|
||||
ChildSizing.HorizontalSpacing = 8
|
||||
ChildSizing.VerticalSpacing = 8
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
object cbbUseGradientInd: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Top = 12
|
||||
Width = 137
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Use &Gradient Indicator'
|
||||
OnChange = cbbUseGradientIndChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object pbxFakeDrive: TPaintBox
|
||||
Tag = 83
|
||||
Left = 157
|
||||
Height = 19
|
||||
Top = 12
|
||||
Width = 125
|
||||
Constraints.MaxHeight = 19
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = pbxFakeDriveClick
|
||||
OnPaint = pbxFakeDrivePaint
|
||||
end
|
||||
object lblIndColor: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 39
|
||||
Width = 137
|
||||
Caption = '&Indicator Fore Color:'
|
||||
FocusControl = cbIndColor
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndColor: TKASColorBoxButton
|
||||
Left = 157
|
||||
Height = 25
|
||||
Top = 39
|
||||
Width = 125
|
||||
TabOrder = 1
|
||||
OnChange = cbIndColorChange
|
||||
end
|
||||
object lblIndThresholdColor: TLabel
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 72
|
||||
Width = 137
|
||||
BorderSpacing.Right = 4
|
||||
Caption = 'Indicator &Threshold Color:'
|
||||
FocusControl = cbIndThresholdColor
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndThresholdColor: TKASColorBoxButton
|
||||
Left = 157
|
||||
Height = 25
|
||||
Top = 72
|
||||
Width = 125
|
||||
TabOrder = 2
|
||||
OnChange = cbIndColorChange
|
||||
end
|
||||
object lblIndBackColor: TLabel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 105
|
||||
Width = 137
|
||||
Caption = 'In&dicator Back Color:'
|
||||
FocusControl = cbIndBackColor
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndBackColor: TKASColorBoxButton
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 157
|
||||
Height = 25
|
||||
Top = 105
|
||||
Width = 125
|
||||
TabOrder = 3
|
||||
OnChange = cbIndColorChange
|
||||
end
|
||||
end
|
||||
object pgDarkMode: TPage
|
||||
ChildSizing.LeftRightSpacing = 12
|
||||
object rgDarkMode: TRadioGroup
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 77
|
||||
Top = 6
|
||||
Width = 567
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
Caption = 'State'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 57
|
||||
ClientWidth = 563
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Auto'
|
||||
'Enabled'
|
||||
'Disabled'
|
||||
)
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object lblCategory: TLabel[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cmbGroup
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 18
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 51
|
||||
BorderSpacing.Left = 18
|
||||
Caption = 'Category:'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,26 @@
|
|||
{"version":1,"strings":[
|
||||
{"hash":148344613,"name":"tfrmoptionscolors.rgdarkmode.caption","sourcebytes":[68,97,114,107,32,109,111,100,101],"value":"Dark mode"}
|
||||
{"hash":97881285,"name":"tfrmoptionscolors.dbbookmode.caption","sourcebytes":[66,111,111,107,32,77,111,100,101],"value":"Book Mode"},
|
||||
{"hash":5951354,"name":"tfrmoptionscolors.lblbooktext.caption","sourcebytes":[84,101,120,116,58],"value":"Text:"},
|
||||
{"hash":249486954,"name":"tfrmoptionscolors.lblbookbackground.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,58],"value":"Background:"},
|
||||
{"hash":225593045,"name":"tfrmoptionscolors.dbimagemode.caption","sourcebytes":[73,109,97,103,101,32,77,111,100,101],"value":"Image Mode"},
|
||||
{"hash":249462170,"name":"tfrmoptionscolors.lblimagebackground1.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,32,49,58],"value":"Background 1:"},
|
||||
{"hash":249462154,"name":"tfrmoptionscolors.lblimagebackground2.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,32,50,58],"value":"Background 2:"},
|
||||
{"hash":258309989,"name":"tfrmoptionscolors.dbtextmode.caption","sourcebytes":[84,101,120,116,32,77,111,100,101],"value":"Text Mode"},
|
||||
{"hash":75148154,"name":"tfrmoptionscolors.lbladded.caption","sourcebytes":[65,100,100,101,100,58],"value":"Added:"},
|
||||
{"hash":204255194,"name":"tfrmoptionscolors.lbldeleted.caption","sourcebytes":[68,101,108,101,116,101,100,58],"value":"Deleted:"},
|
||||
{"hash":184332074,"name":"tfrmoptionscolors.lblmodified.caption","sourcebytes":[77,111,100,105,102,105,101,100,58],"value":"Modified:"},
|
||||
{"hash":167657765,"name":"tfrmoptionscolors.dbbinarymode.caption","sourcebytes":[66,105,110,97,114,121,32,77,111,100,101],"value":"Binary Mode"},
|
||||
{"hash":184332074,"name":"tfrmoptionscolors.lblmodifiedbinary.caption","sourcebytes":[77,111,100,105,102,105,101,100,58],"value":"Modified:"},
|
||||
{"hash":109982858,"name":"tfrmoptionscolors.lblinformation.caption","sourcebytes":[73,110,102,111,114,109,97,116,105,111,110,58],"value":"Information:"},
|
||||
{"hash":194629578,"name":"tfrmoptionscolors.lblsuccess.caption","sourcebytes":[83,117,99,99,101,115,115,58],"value":"Success:"},
|
||||
{"hash":80320090,"name":"tfrmoptionscolors.lblerror.caption","sourcebytes":[69,114,114,111,114,58],"value":"Error:"},
|
||||
{"hash":5422458,"name":"tfrmoptionscolors.lblleft.caption","sourcebytes":[76,101,102,116,58],"value":"Left:"},
|
||||
{"hash":93314938,"name":"tfrmoptionscolors.lblright.caption","sourcebytes":[82,105,103,104,116,58],"value":"Right:"},
|
||||
{"hash":86338010,"name":"tfrmoptionscolors.lblunknown.caption","sourcebytes":[85,110,107,110,111,119,110,58],"value":"Unknown:"},
|
||||
{"hash":135998194,"name":"tfrmoptionscolors.cbbusegradientind.caption","sourcebytes":[85,115,101,32,38,71,114,97,100,105,101,110,116,32,73,110,100,105,99,97,116,111,114],"value":"Use &Gradient Indicator"},
|
||||
{"hash":171869450,"name":"tfrmoptionscolors.lblindcolor.caption","sourcebytes":[38,73,110,100,105,99,97,116,111,114,32,70,111,114,101,32,67,111,108,111,114,58],"value":"&Indicator Fore Color:"},
|
||||
{"hash":115941530,"name":"tfrmoptionscolors.lblindthresholdcolor.caption","sourcebytes":[73,110,100,105,99,97,116,111,114,32,38,84,104,114,101,115,104,111,108,100,32,67,111,108,111,114,58],"value":"Indicator &Threshold Color:"},
|
||||
{"hash":171107370,"name":"tfrmoptionscolors.lblindbackcolor.caption","sourcebytes":[73,110,38,100,105,99,97,116,111,114,32,66,97,99,107,32,67,111,108,111,114,58],"value":"In&dicator Back Color:"},
|
||||
{"hash":5941413,"name":"tfrmoptionscolors.rgdarkmode.caption","sourcebytes":[83,116,97,116,101],"value":"State"},
|
||||
{"hash":180232266,"name":"tfrmoptionscolors.lblcategory.caption","sourcebytes":[67,97,116,101,103,111,114,121,58],"value":"Category:"}
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -5,23 +5,86 @@ unit fOptionsColors;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, ExtCtrls, Dialogs,
|
||||
fOptionsFrame, fOptionsGroups;
|
||||
Classes, SysUtils, Forms, Controls, ExtCtrls, Dialogs, StdCtrls,
|
||||
DividerBevel, fOptionsFrame, KASComboBox, LMessages;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmOptionsColors }
|
||||
|
||||
TfrmOptionsColors = class(TOptionsColorsGroup)
|
||||
TfrmOptionsColors = class(TOptionsEditor)
|
||||
cbAdded: TKASColorBoxButton;
|
||||
cbBookBackground: TKASColorBoxButton;
|
||||
cbBookText: TKASColorBoxButton;
|
||||
cbbUseGradientInd: TCheckBox;
|
||||
cbDeleted: TKASColorBoxButton;
|
||||
cbError: TKASColorBoxButton;
|
||||
cbImageBackground1: TKASColorBoxButton;
|
||||
cbImageBackground2: TKASColorBoxButton;
|
||||
cbIndBackColor: TKASColorBoxButton;
|
||||
cbIndColor: TKASColorBoxButton;
|
||||
cbIndThresholdColor: TKASColorBoxButton;
|
||||
cbInformation: TKASColorBoxButton;
|
||||
cbLeft: TKASColorBoxButton;
|
||||
cbModifiedBinary: TKASColorBoxButton;
|
||||
cbRight: TKASColorBoxButton;
|
||||
cbSuccess: TKASColorBoxButton;
|
||||
cbUnknown: TKASColorBoxButton;
|
||||
cmbGroup: TComboBox;
|
||||
cbModified: TKASColorBoxButton;
|
||||
dbBookMode: TDividerBevel;
|
||||
dbImageMode: TDividerBevel;
|
||||
DividerBevel11: TDividerBevel;
|
||||
dbTextMode: TDividerBevel;
|
||||
DividerBevel4: TDividerBevel;
|
||||
dbBinaryMode: TDividerBevel;
|
||||
DividerBevel6: TDividerBevel;
|
||||
DividerBevel9: TDividerBevel;
|
||||
lblCategory: TLabel;
|
||||
lblAdded: TLabel;
|
||||
lblBookBackground: TLabel;
|
||||
lblBookText: TLabel;
|
||||
lblDeleted: TLabel;
|
||||
lblError: TLabel;
|
||||
lblImageBackground1: TLabel;
|
||||
lblImageBackground2: TLabel;
|
||||
lblIndBackColor: TLabel;
|
||||
lblIndColor: TLabel;
|
||||
lblIndThresholdColor: TLabel;
|
||||
lblInformation: TLabel;
|
||||
lblLeft: TLabel;
|
||||
lblModified: TLabel;
|
||||
lblModifiedBinary: TLabel;
|
||||
lblRight: TLabel;
|
||||
lblSuccess: TLabel;
|
||||
lblUnknown: TLabel;
|
||||
nbColors: TNotebook;
|
||||
pgDriveFreeInd: TPage;
|
||||
pbxFakeDrive: TPaintBox;
|
||||
pgDarkMode: TPage;
|
||||
pgDiffer: TPage;
|
||||
pgLog: TPage;
|
||||
pgSyncDirs: TPage;
|
||||
pgViewer: TPage;
|
||||
rgDarkMode: TRadioGroup;
|
||||
procedure cbbUseGradientIndChange(Sender: TObject);
|
||||
procedure cbIndColorChange(Sender: TObject);
|
||||
procedure cmbGroupChange(Sender: TObject);
|
||||
procedure pbxFakeDriveClick(Sender: TObject);
|
||||
procedure pbxFakeDrivePaint(Sender: TObject);
|
||||
{$IF DEFINED(DARKWIN)}
|
||||
private
|
||||
FAppMode: Integer;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure Init; override;
|
||||
procedure Load; override;
|
||||
procedure DoAutoSize; override;
|
||||
function Save: TOptionsEditorSaveFlags; override;
|
||||
procedure CMThemeChanged(var Message: TLMessage); message CM_THEMECHANGED;
|
||||
public
|
||||
class function IsEmpty: Boolean; override;
|
||||
class function GetIconIndex: Integer; override;
|
||||
class function GetTitle: String; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -29,28 +92,159 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
DCStrUtils, uEarlyConfig, uDarkStyle, uLng;
|
||||
uGlobs, uLng, uDCUtils, fMain
|
||||
{$IF DEFINED(DARKWIN)}
|
||||
, DCStrUtils, uEarlyConfig, uDarkStyle
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
{ TfrmOptionsColors }
|
||||
|
||||
procedure TfrmOptionsColors.cmbGroupChange(Sender: TObject);
|
||||
begin
|
||||
nbColors.PageIndex:= cmbGroup.ItemIndex;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.pbxFakeDriveClick(Sender: TObject);
|
||||
begin
|
||||
pbxFakeDrive.Tag:= (pbxFakeDrive.ScreenToClient(Mouse.CursorPos).X * 100) div pbxFakeDrive.Width;
|
||||
pbxFakeDrive.Hint:= pbxFakeDrive.Tag.ToString + '%';
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.cbbUseGradientIndChange(Sender: TObject);
|
||||
var vNoGradient: boolean;
|
||||
begin
|
||||
vNoGradient := not (cbbUseGradientInd.Checked);
|
||||
|
||||
lblIndThresholdColor.Enabled := vNoGradient;
|
||||
lblIndColor.Enabled := vNoGradient;
|
||||
lblIndBackColor.Enabled := vNoGradient;
|
||||
|
||||
cbIndThresholdColor.Enabled := vNoGradient;
|
||||
cbIndColor.Enabled := vNoGradient;
|
||||
cbIndBackColor.Enabled := vNoGradient;
|
||||
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.cbIndColorChange(Sender: TObject);
|
||||
begin
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.pbxFakeDrivePaint(Sender: TObject);
|
||||
begin
|
||||
frmMain.PaintDriveFreeBar(pbxFakeDrive, cbbUseGradientInd.Checked,
|
||||
cbIndColor.Selected, cbIndThresholdColor.Selected, cbIndBackColor.Selected);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.Init;
|
||||
begin
|
||||
cmbGroup.Items.Add(rsToolViewer);
|
||||
cmbGroup.Items.Add(rsToolDiffer);
|
||||
cmbGroup.Items.Add(rsOptionsEditorLog);
|
||||
cmbGroup.Items.Add(rsHotkeyCategorySyncDirs);
|
||||
cmbGroup.Items.Add(rsDriveFreeSpaceIndicator);
|
||||
cmbGroup.ItemIndex:= 0;
|
||||
{$IF DEFINED(DARKWIN)}
|
||||
FAppMode:= gAppMode;
|
||||
ParseLineToList(rsDarkModeOptions, rgDarkMode.Items);
|
||||
cmbGroup.ItemIndex:= cmbGroup.Items.Add(rsDarkMode);
|
||||
nbColors.PageIndex:= cmbGroup.ItemIndex;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.Load;
|
||||
begin
|
||||
{$IF DEFINED(DARKWIN)}
|
||||
case FAppMode of
|
||||
1: rgDarkMode.ItemIndex:= 0;
|
||||
2: rgDarkMode.ItemIndex:= 1;
|
||||
3: rgDarkMode.ItemIndex:= 2;
|
||||
end;
|
||||
{$ENDIF}
|
||||
with gColors.Viewer^ do
|
||||
begin
|
||||
cbBookText.Selected:= BookFontColor;
|
||||
cbBookBackground.Selected:= BookBackgroundColor;
|
||||
cbImageBackground1.Selected:= ImageBackColor1;
|
||||
cbImageBackground2.Selected:= ImageBackColor2;
|
||||
end;
|
||||
with gColors.Differ^ do
|
||||
begin
|
||||
cbAdded.Selected:= AddedColor;
|
||||
cbDeleted.Selected:= DeletedColor;
|
||||
cbModified.Selected:= ModifiedColor;
|
||||
cbModifiedBinary.Selected:= ModifiedBinaryColor;
|
||||
end;
|
||||
with gColors.Log^ do
|
||||
begin
|
||||
cbInformation.Selected:= InfoColor;
|
||||
cbSuccess.Selected:= SuccessColor;
|
||||
cbError.Selected:= ErrorColor;
|
||||
end;
|
||||
with gColors.SyncDirs^ do
|
||||
begin
|
||||
cbLeft.Selected:= LeftColor;
|
||||
cbRight.Selected:= RightColor;
|
||||
cbUnknown.Selected:= UnknownColor;
|
||||
end;
|
||||
with gColors.FreeSpaceInd^ do
|
||||
begin
|
||||
cbIndColor.Selected:= ForeColor;
|
||||
cbIndBackColor.Selected:= BackColor;
|
||||
cbIndThresholdColor.Selected:= ThresholdForeColor;
|
||||
end;
|
||||
cbbUseGradientInd.Checked:= gIndUseGradient;
|
||||
pbxFakeDrive.Hint:= pbxFakeDrive.Tag.ToString + '%';
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsColors.DoAutoSize;
|
||||
var
|
||||
I, J: Integer;
|
||||
AControl: TControl;
|
||||
AMaxWidth: Integer = 0;
|
||||
begin
|
||||
inherited DoAutoSize;
|
||||
if csDesigning in ComponentState then Exit;
|
||||
|
||||
pbxFakeDrive.Constraints.MaxHeight:= cbbUseGradientInd.Height;
|
||||
|
||||
for I:= 0 to nbColors.PageCount - 1 do
|
||||
begin
|
||||
with nbColors.Page[I] do
|
||||
begin
|
||||
for J := 0 to ControlCount - 1 do
|
||||
begin
|
||||
AControl:= Controls[J];
|
||||
if AControl is TLabel then
|
||||
begin
|
||||
if (AControl.Width > AMaxWidth) then AMaxWidth:= AControl.Width;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
for I:= 0 to nbColors.PageCount - 1 do
|
||||
begin
|
||||
with nbColors.Page[I] do
|
||||
begin
|
||||
for J := 0 to ControlCount - 1 do
|
||||
begin
|
||||
AControl:= Controls[J];
|
||||
if AControl is TLabel then
|
||||
begin
|
||||
AControl.Constraints.MinWidth:= AMaxWidth;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmOptionsColors.Save: TOptionsEditorSaveFlags;
|
||||
begin
|
||||
Result:= [];
|
||||
{$IF DEFINED(DARKWIN)}
|
||||
case rgDarkMode.ItemIndex of
|
||||
0: gAppMode:= 1;
|
||||
1: gAppMode:= 2;
|
||||
|
|
@ -63,11 +257,55 @@ begin
|
|||
except
|
||||
on E: Exception do MessageDlg(E.Message, mtError, [mbOK], 0);
|
||||
end;
|
||||
{$ENDIF}
|
||||
with gColors.Viewer^ do
|
||||
begin
|
||||
BookFontColor:= cbBookText.Selected;
|
||||
BookBackgroundColor:= cbBookBackground.Selected;
|
||||
ImageBackColor1:= cbImageBackground1.Selected;
|
||||
ImageBackColor2:= cbImageBackground2.Selected;
|
||||
end;
|
||||
with gColors.Differ^ do
|
||||
begin
|
||||
AddedColor:= cbAdded.Selected;
|
||||
DeletedColor:= cbDeleted.Selected;
|
||||
ModifiedColor:= cbModified.Selected;
|
||||
ModifiedBinaryColor:= cbModifiedBinary.Selected;
|
||||
end;
|
||||
with gColors.Log^ do
|
||||
begin
|
||||
InfoColor:= cbInformation.Selected;
|
||||
SuccessColor:= cbSuccess.Selected;
|
||||
ErrorColor:= cbError.Selected;
|
||||
end;
|
||||
with gColors.SyncDirs^ do
|
||||
begin
|
||||
LeftColor:= cbLeft.Selected;
|
||||
RightColor:= cbRight.Selected;
|
||||
UnknownColor:= cbUnknown.Selected;
|
||||
end;
|
||||
gIndUseGradient:= cbbUseGradientInd.Checked;
|
||||
with gColors.FreeSpaceInd^ do
|
||||
begin
|
||||
ForeColor := cbIndColor.Selected;
|
||||
BackColor := cbIndBackColor.Selected;
|
||||
ThresholdForeColor := cbIndThresholdColor.Selected;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TfrmOptionsColors.IsEmpty: Boolean;
|
||||
procedure TfrmOptionsColors.CMThemeChanged(var Message: TLMessage);
|
||||
begin
|
||||
Result:= not g_darkModeSupported;
|
||||
LoadSettings;
|
||||
end;
|
||||
|
||||
class function TfrmOptionsColors.GetIconIndex: Integer;
|
||||
begin
|
||||
Result:= 4;
|
||||
end;
|
||||
|
||||
class function TfrmOptionsColors.GetTitle: String;
|
||||
begin
|
||||
Result:= rsOptionsEditorColors;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -455,13 +455,13 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
AnchorSideLeft.Control = lblInactivePanelBrightness
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = lblInactivePanelBrightness
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
AnchorSideRight.Control = btnPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = dbFreeSpaceIndicator
|
||||
AnchorSideBottom.Control = dbCurrentPath
|
||||
Left = 644
|
||||
Height = 22
|
||||
Top = 64
|
||||
Width = 229
|
||||
Width = 227
|
||||
Max = 100
|
||||
OnChange = tbInactivePanelBrightnessChange
|
||||
PageSize = 10
|
||||
|
|
@ -471,151 +471,118 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
TabOrder = 24
|
||||
TabOrder = 23
|
||||
end
|
||||
object dbFreeSpaceIndicator: TDividerBevel[30]
|
||||
object dbCurrentPath: TDividerBevel[30]
|
||||
AnchorSideLeft.Control = lblInactivePanelBrightness
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
AnchorSideTop.Control = cbMarkColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = btnPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbbUseGradientInd
|
||||
Left = 463
|
||||
Height = 15
|
||||
Top = 93
|
||||
Width = 410
|
||||
Caption = 'Drive Free Space Indicator'
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
end
|
||||
object cbbUseGradientInd: TCheckBox[31]
|
||||
AnchorSideLeft.Control = lblInactivePanelBrightness
|
||||
AnchorSideTop.Control = lblCursorColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideBottom.Control = cbIndColor
|
||||
Left = 463
|
||||
Height = 19
|
||||
Top = 114
|
||||
Width = 137
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'Use &Gradient Indicator'
|
||||
OnChange = cbbUseGradientIndChange
|
||||
TabOrder = 25
|
||||
end
|
||||
object pbxFakeDrive: TPaintBox[32]
|
||||
Tag = 83
|
||||
AnchorSideLeft.Control = cbbUseGradientInd
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbbUseGradientInd
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 603
|
||||
Height = 10
|
||||
Top = 118
|
||||
Width = 268
|
||||
Top = 90
|
||||
Width = 408
|
||||
Caption = 'Current Path'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 3
|
||||
BorderSpacing.Right = 2
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
OnClick = pbxFakeDriveClick
|
||||
OnPaint = pbxFakeDrivePaint
|
||||
Style = gsHorLines
|
||||
end
|
||||
object lblIndColor: TLabel[33]
|
||||
object lblPathActiveBack: TLabel[31]
|
||||
AnchorSideLeft.Control = cbbUseInvertedSelection
|
||||
AnchorSideTop.Control = cbIndColor
|
||||
AnchorSideTop.Control = cbPathActiveBack
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbIndColor
|
||||
Left = 497
|
||||
AnchorSideRight.Control = cbPathActiveBack
|
||||
Left = 536
|
||||
Height = 15
|
||||
Top = 142
|
||||
Width = 108
|
||||
Width = 67
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
Caption = '&Indicator Fore Color:'
|
||||
FocusControl = cbIndColor
|
||||
Caption = 'Background:'
|
||||
FocusControl = cbPathActiveBack
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndColor: TColorBox[34]
|
||||
object cbPathActiveBack: TColorBox[32]
|
||||
AnchorSideLeft.Control = cbbUseInactiveSelColor
|
||||
AnchorSideTop.Control = cbCursorText
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbIndBackColor
|
||||
AnchorSideRight.Control = cbPathInactiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 609
|
||||
Left = 607
|
||||
Height = 22
|
||||
Top = 138
|
||||
Width = 230
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ItemHeight = 16
|
||||
OnChange = cbIndColorChange
|
||||
TabOrder = 32
|
||||
OnChange = cbPathActiveBackChange
|
||||
TabOrder = 26
|
||||
end
|
||||
object btnIndColor: TButton[35]
|
||||
AnchorSideLeft.Control = cbIndColor
|
||||
object btnPathActiveBack: TButton[33]
|
||||
AnchorSideLeft.Control = cbPathActiveBack
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbIndColor
|
||||
AnchorSideTop.Control = cbPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbIndColor
|
||||
AnchorSideBottom.Control = cbPathActiveBack
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 845
|
||||
Left = 843
|
||||
Height = 22
|
||||
Top = 138
|
||||
Width = 28
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
Caption = '>>'
|
||||
OnClick = btnIndColorClick
|
||||
OnClick = btnPathActiveBackClick
|
||||
TabOrder = 27
|
||||
end
|
||||
object lblIndBackColor: TLabel[36]
|
||||
object lblPathInactiveBack: TLabel[34]
|
||||
AnchorSideLeft.Control = cbbUseInvertedSelection
|
||||
AnchorSideTop.Control = cbIndBackColor
|
||||
AnchorSideTop.Control = cbPathInactiveBack
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = lblIndColor
|
||||
AnchorSideRight.Control = lblPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 495
|
||||
Left = 492
|
||||
Height = 15
|
||||
Top = 194
|
||||
Width = 110
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'In&dicator Back Color:'
|
||||
FocusControl = cbIndBackColor
|
||||
Caption = 'Inactive Background:'
|
||||
FocusControl = cbPathInactiveBack
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndBackColor: TColorBox[37]
|
||||
object cbPathInactiveBack: TColorBox[35]
|
||||
AnchorSideLeft.Control = cbbUseInactiveSelColor
|
||||
AnchorSideTop.Control = cbInactiveMarkColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbIndColor
|
||||
AnchorSideRight.Control = cbPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 609
|
||||
Left = 607
|
||||
Height = 22
|
||||
Top = 190
|
||||
Width = 230
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
BorderSpacing.Top = 4
|
||||
ItemHeight = 16
|
||||
OnChange = cbIndColorChange
|
||||
OnChange = cbPathInactiveBackChange
|
||||
TabOrder = 30
|
||||
end
|
||||
object btnIndBackColor: TButton[38]
|
||||
AnchorSideLeft.Control = btnIndColor
|
||||
AnchorSideTop.Control = cbIndBackColor
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
object btnPathInactiveBack: TButton[36]
|
||||
AnchorSideLeft.Control = btnPathActiveBack
|
||||
AnchorSideTop.Control = cbPathInactiveBack
|
||||
AnchorSideRight.Control = btnPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbIndBackColor
|
||||
AnchorSideBottom.Control = cbPathInactiveBack
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 845
|
||||
Left = 843
|
||||
Height = 22
|
||||
Top = 190
|
||||
Width = 28
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
Caption = '>>'
|
||||
OnClick = btnIndBackColorClick
|
||||
OnClick = btnPathInactiveBackClick
|
||||
TabOrder = 31
|
||||
end
|
||||
object pnlPreviewCont: TPanel[39]
|
||||
object pnlPreviewCont: TPanel[37]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = cbCursorBorderColor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
|
|
@ -635,8 +602,9 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
ClientWidth = 880
|
||||
Color = clInactiveCaption
|
||||
Constraints.MinHeight = 250
|
||||
ParentBackground = False
|
||||
ParentColor = False
|
||||
TabOrder = 26
|
||||
TabOrder = 33
|
||||
TabStop = True
|
||||
object lblPreview: TLabel
|
||||
Left = 8
|
||||
|
|
@ -686,21 +654,21 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
ResizeAnchor = akRight
|
||||
end
|
||||
end
|
||||
object cbUseCursorBorder: TCheckBox[40]
|
||||
object cbUseCursorBorder: TCheckBox[38]
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbCursorBorderColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbCursorBorderColor
|
||||
Left = 67
|
||||
Left = 69
|
||||
Height = 19
|
||||
Top = 218
|
||||
Width = 93
|
||||
Width = 91
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Cursor border'
|
||||
OnChange = cbUseCursorBorderChange
|
||||
TabOrder = 16
|
||||
end
|
||||
object cbCursorBorderColor: TColorBox[41]
|
||||
object cbCursorBorderColor: TColorBox[39]
|
||||
AnchorSideLeft.Control = cbInactiveMarkColor
|
||||
AnchorSideTop.Control = cbInactiveMarkColor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
|
|
@ -717,7 +685,7 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
OnChange = cbColorBoxChange
|
||||
TabOrder = 17
|
||||
end
|
||||
object btnCursorBorderColor: TButton[42]
|
||||
object btnCursorBorderColor: TButton[40]
|
||||
AnchorSideLeft.Control = btnForeColor
|
||||
AnchorSideTop.Control = cbCursorBorderColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
|
|
@ -734,11 +702,11 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
OnClick = btnCursorBorderColorClick
|
||||
TabOrder = 18
|
||||
end
|
||||
object btnResetToDCDefault: TButton[43]
|
||||
object btnResetToDCDefault: TButton[41]
|
||||
AnchorSideTop.Control = cbCursorBorderColor
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
AnchorSideRight.Control = btnPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 746
|
||||
Left = 744
|
||||
Height = 25
|
||||
Top = 216
|
||||
Width = 127
|
||||
|
|
@ -746,70 +714,117 @@ inherited frmOptionsFilePanelsColors: TfrmOptionsFilePanelsColors
|
|||
AutoSize = True
|
||||
Caption = 'Reset to DC default'
|
||||
OnClick = btnResetToDCDefaultClick
|
||||
TabOrder = 23
|
||||
TabOrder = 32
|
||||
end
|
||||
object cbAllowOverColor: TCheckBox[44]
|
||||
object cbAllowOverColor: TCheckBox[42]
|
||||
AnchorSideLeft.Control = cbbUseInactiveSelColor
|
||||
AnchorSideTop.Control = cbbUseFrameCursor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 609
|
||||
Left = 607
|
||||
Height = 19
|
||||
Top = 38
|
||||
Width = 105
|
||||
Width = 103
|
||||
Caption = 'Allow Overcolor'
|
||||
OnChange = cbbUseInactiveSelColorChange
|
||||
TabOrder = 22
|
||||
end
|
||||
object lblIndThresholdColor: TLabel[45]
|
||||
object lblPathInactiveText: TLabel[43]
|
||||
AnchorSideLeft.Control = cbbUseInvertedSelection
|
||||
AnchorSideTop.Control = cbIndThresholdColor
|
||||
AnchorSideTop.Control = cbPathInactiveText
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbIndThresholdColor
|
||||
Left = 468
|
||||
AnchorSideRight.Control = cbPathInactiveText
|
||||
Left = 503
|
||||
Height = 15
|
||||
Top = 168
|
||||
Width = 137
|
||||
Width = 100
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
Caption = 'Indicator &Threshold Color:'
|
||||
FocusControl = cbIndThresholdColor
|
||||
Caption = 'Inactive Text Color:'
|
||||
FocusControl = cbPathInactiveText
|
||||
ParentColor = False
|
||||
end
|
||||
object cbIndThresholdColor: TColorBox[46]
|
||||
object cbPathInactiveText: TColorBox[44]
|
||||
AnchorSideLeft.Control = cbbUseInactiveSelColor
|
||||
AnchorSideTop.Control = cbInactiveCursorColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbIndBackColor
|
||||
AnchorSideRight.Control = cbPathInactiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 609
|
||||
Left = 607
|
||||
Height = 22
|
||||
Top = 164
|
||||
Width = 230
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ItemHeight = 16
|
||||
OnChange = cbIndColorChange
|
||||
OnChange = cbPathInactiveTextChange
|
||||
TabOrder = 28
|
||||
end
|
||||
object btnIndThresholdColor: TButton[47]
|
||||
AnchorSideLeft.Control = cbIndThresholdColor
|
||||
object btnPathInactiveText: TButton[45]
|
||||
AnchorSideLeft.Control = cbPathInactiveText
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbIndThresholdColor
|
||||
AnchorSideRight.Control = btnIndColor
|
||||
AnchorSideTop.Control = cbPathInactiveText
|
||||
AnchorSideRight.Control = btnPathActiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbIndThresholdColor
|
||||
AnchorSideBottom.Control = cbPathInactiveText
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 845
|
||||
Left = 843
|
||||
Height = 22
|
||||
Top = 164
|
||||
Width = 28
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
Caption = '>>'
|
||||
OnClick = btnIndThresholdColorClick
|
||||
OnClick = btnPathInactiveTextClick
|
||||
TabOrder = 29
|
||||
end
|
||||
object optColorDialog: TColorDialog[48]
|
||||
object cbPathActiveText: TColorBox[46]
|
||||
AnchorSideLeft.Control = cbbUseInactiveSelColor
|
||||
AnchorSideTop.Control = cbCursorColor
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbPathInactiveBack
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 607
|
||||
Height = 22
|
||||
Top = 112
|
||||
Width = 230
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ItemHeight = 16
|
||||
OnChange = cbPathActiveTextChange
|
||||
TabOrder = 24
|
||||
end
|
||||
object lblPathActiveText: TLabel[47]
|
||||
AnchorSideTop.Control = cbPathActiveText
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbPathInactiveText
|
||||
Left = 547
|
||||
Height = 15
|
||||
Top = 116
|
||||
Width = 56
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
Caption = 'Text Color:'
|
||||
FocusControl = cbPathInactiveText
|
||||
ParentColor = False
|
||||
end
|
||||
object btnPathActiveText: TButton[48]
|
||||
AnchorSideLeft.Control = cbPathActiveText
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbPathActiveText
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbPathActiveText
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 843
|
||||
Height = 22
|
||||
Top = 112
|
||||
Width = 28
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
Caption = '>>'
|
||||
OnClick = btnPathActiveTextClick
|
||||
TabOrder = 25
|
||||
end
|
||||
object optColorDialog: TColorDialog[49]
|
||||
Color = clBlack
|
||||
CustomColors.Strings = (
|
||||
'ColorA=000000'
|
||||
|
|
|
|||
|
|
@ -19,17 +19,18 @@
|
|||
{"hash":194038066,"name":"tfrmoptionsfilepanelscolors.cbbuseinactiveselcolor.caption","sourcebytes":[85,115,101,32,73,110,97,99,116,105,118,101,32,83,101,108,32,67,111,108,111,114],"value":"Use Inactive Sel Color"},
|
||||
{"hash":237530674,"name":"tfrmoptionsfilepanelscolors.cbbuseframecursor.caption","sourcebytes":[85,115,101,32,38,70,114,97,109,101,32,67,117,114,115,111,114],"value":"Use &Frame Cursor"},
|
||||
{"hash":195339690,"name":"tfrmoptionsfilepanelscolors.lblinactivepanelbrightness.caption","sourcebytes":[38,66,114,105,103,104,116,110,101,115,115,32,108,101,118,101,108,32,111,102,32,105,110,97,99,116,105,118,101,32,112,97,110,101,108,58],"value":"&Brightness level of inactive panel:"},
|
||||
{"hash":215346466,"name":"tfrmoptionsfilepanelscolors.dbfreespaceindicator.caption","sourcebytes":[68,114,105,118,101,32,70,114,101,101,32,83,112,97,99,101,32,73,110,100,105,99,97,116,111,114],"value":"Drive Free Space Indicator"},
|
||||
{"hash":135998194,"name":"tfrmoptionsfilepanelscolors.cbbusegradientind.caption","sourcebytes":[85,115,101,32,38,71,114,97,100,105,101,110,116,32,73,110,100,105,99,97,116,111,114],"value":"Use &Gradient Indicator"},
|
||||
{"hash":171869450,"name":"tfrmoptionsfilepanelscolors.lblindcolor.caption","sourcebytes":[38,73,110,100,105,99,97,116,111,114,32,70,111,114,101,32,67,111,108,111,114,58],"value":"&Indicator Fore Color:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnindcolor.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":171107370,"name":"tfrmoptionsfilepanelscolors.lblindbackcolor.caption","sourcebytes":[73,110,38,100,105,99,97,116,111,114,32,66,97,99,107,32,67,111,108,111,114,58],"value":"In&dicator Back Color:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnindbackcolor.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":30011496,"name":"tfrmoptionsfilepanelscolors.dbcurrentpath.caption","sourcebytes":[67,117,114,114,101,110,116,32,80,97,116,104],"value":"Current Path"},
|
||||
{"hash":249486954,"name":"tfrmoptionsfilepanelscolors.lblpathactiveback.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,58],"value":"Background:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnpathactiveback.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":230984106,"name":"tfrmoptionsfilepanelscolors.lblpathinactiveback.caption","sourcebytes":[73,110,97,99,116,105,118,101,32,66,97,99,107,103,114,111,117,110,100,58],"value":"Inactive Background:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnpathinactiveback.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":217190446,"name":"tfrmoptionsfilepanelscolors.lblpreview.caption","sourcebytes":[66,101,108,111,119,32,105,115,32,97,32,112,114,101,118,105,101,119,46,32,89,111,117,32,109,97,121,32,109,111,118,101,32,99,117,114,115,111,114,44,32,115,101,108,101,99,116,32,102,105,108,101,32,97,110,100,32,103,101,116,32,105,109,109,101,100,105,97,116,101,108,121,32,97,110,32,97,99,116,117,97,108,32,108,111,111,107,32,97,110,100,32,102,101,101,108,32,111,102,32,116,104,101,32,118,97,114,105,111,117,115,32,115,101,116,116,105,110,103,115,46],"value":"Below is a preview. You may move cursor, select file and get immediately an actual look and feel of the various settings."},
|
||||
{"hash":207563970,"name":"tfrmoptionsfilepanelscolors.cbusecursorborder.caption","sourcebytes":[67,117,114,115,111,114,32,98,111,114,100,101,114],"value":"Cursor border"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btncursorbordercolor.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":157403508,"name":"tfrmoptionsfilepanelscolors.btnresettodcdefault.caption","sourcebytes":[82,101,115,101,116,32,116,111,32,68,67,32,100,101,102,97,117,108,116],"value":"Reset to DC default"},
|
||||
{"hash":266427794,"name":"tfrmoptionsfilepanelscolors.cballowovercolor.caption","sourcebytes":[65,108,108,111,119,32,79,118,101,114,99,111,108,111,114],"value":"Allow Overcolor"},
|
||||
{"hash":115941530,"name":"tfrmoptionsfilepanelscolors.lblindthresholdcolor.caption","sourcebytes":[73,110,100,105,99,97,116,111,114,32,38,84,104,114,101,115,104,111,108,100,32,67,111,108,111,114,58],"value":"Indicator &Threshold Color:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnindthresholdcolor.caption","sourcebytes":[62,62],"value":">>"}
|
||||
{"hash":130444538,"name":"tfrmoptionsfilepanelscolors.lblpathinactivetext.caption","sourcebytes":[73,110,97,99,116,105,118,101,32,84,101,120,116,32,67,111,108,111,114,58],"value":"Inactive Text Color:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnpathinactivetext.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":81852730,"name":"tfrmoptionsfilepanelscolors.lblpathactivetext.caption","sourcebytes":[84,101,120,116,32,67,111,108,111,114,58],"value":"Text Color:"},
|
||||
{"hash":1054,"name":"tfrmoptionsfilepanelscolors.btnpathactivetext.caption","sourcebytes":[62,62],"value":">>"}
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -38,13 +38,16 @@ type
|
|||
{ TfrmOptionsFilePanelsColors }
|
||||
TfrmOptionsFilePanelsColors = class(TOptionsEditor)
|
||||
btnCursorBorderColor: TButton;
|
||||
btnIndThresholdColor: TButton;
|
||||
btnPathActiveText: TButton;
|
||||
btnPathInactiveText: TButton;
|
||||
btnResetToDCDefault: TButton;
|
||||
cbAllowOverColor: TCheckBox;
|
||||
cbIndThresholdColor: TColorBox;
|
||||
cbPathActiveText: TColorBox;
|
||||
cbPathInactiveText: TColorBox;
|
||||
cbUseCursorBorder: TCheckBox;
|
||||
cbCursorBorderColor: TColorBox;
|
||||
lblIndThresholdColor: TLabel;
|
||||
lblPathInactiveText: TLabel;
|
||||
lblPathActiveText: TLabel;
|
||||
lblTextColor: TLabel;
|
||||
cbTextColor: TColorBox;
|
||||
btnForeColor: TButton;
|
||||
|
|
@ -76,23 +79,22 @@ type
|
|||
lblInactivePanelBrightness: TLabel;
|
||||
spPanelSplitter: TSplitter;
|
||||
tbInactivePanelBrightness: TTrackBar;
|
||||
dbFreeSpaceIndicator: TDividerBevel;
|
||||
cbbUseGradientInd: TCheckBox;
|
||||
pbxFakeDrive: TPaintBox;
|
||||
lblIndColor: TLabel;
|
||||
cbIndColor: TColorBox;
|
||||
btnIndColor: TButton;
|
||||
lblIndBackColor: TLabel;
|
||||
cbIndBackColor: TColorBox;
|
||||
btnIndBackColor: TButton;
|
||||
dbCurrentPath: TDividerBevel;
|
||||
lblPathActiveBack: TLabel;
|
||||
cbPathActiveBack: TColorBox;
|
||||
btnPathActiveBack: TButton;
|
||||
lblPathInactiveBack: TLabel;
|
||||
cbPathInactiveBack: TColorBox;
|
||||
btnPathInactiveBack: TButton;
|
||||
pnlPreviewCont: TPanel;
|
||||
lblPreview: TLabel;
|
||||
pnlLeftPreview: TPanel;
|
||||
pnlRightPreview: TPanel;
|
||||
optColorDialog: TColorDialog;
|
||||
procedure btnCursorBorderColorClick(Sender: TObject);
|
||||
procedure btnPathActiveTextClick(Sender: TObject);
|
||||
procedure btnResetToDCDefaultClick(Sender: TObject);
|
||||
procedure btnIndThresholdColorClick(Sender: TObject);
|
||||
procedure btnPathInactiveTextClick(Sender: TObject);
|
||||
procedure cbbUseFrameCursorChange(Sender: TObject);
|
||||
procedure cbColorBoxChange(Sender: TObject);
|
||||
procedure btnForeColorClick(Sender: TObject);
|
||||
|
|
@ -104,15 +106,15 @@ type
|
|||
procedure btnInactiveCursorColorClick(Sender: TObject);
|
||||
procedure btnInactiveMarkColorClick(Sender: TObject);
|
||||
procedure cbbUseInactiveSelColorChange(Sender: TObject);
|
||||
procedure cbPathActiveTextChange(Sender: TObject);
|
||||
procedure cbPathInactiveBackChange(Sender: TObject);
|
||||
procedure cbPathInactiveTextChange(Sender: TObject);
|
||||
procedure cbUseCursorBorderChange(Sender: TObject);
|
||||
procedure pbxFakeDriveClick(Sender: TObject);
|
||||
procedure tbInactivePanelBrightnessChange(Sender: TObject);
|
||||
procedure cbbUseGradientIndChange(Sender: TObject);
|
||||
procedure cbIndColorChange(Sender: TObject);
|
||||
procedure btnIndColorClick(Sender: TObject);
|
||||
procedure btnIndBackColorClick(Sender: TObject);
|
||||
procedure cbPathActiveBackChange(Sender: TObject);
|
||||
procedure btnPathActiveBackClick(Sender: TObject);
|
||||
procedure btnPathInactiveBackClick(Sender: TObject);
|
||||
procedure RefreshPreviewPanel;
|
||||
procedure pbxFakeDrivePaint(Sender: TObject);
|
||||
procedure pnlLeftPreviewEnter(Sender: TObject);
|
||||
procedure pnlRightPreviewEnter(Sender: TObject);
|
||||
function JustForConfigDim(AColor: TColor): TColor;
|
||||
|
|
@ -187,13 +189,6 @@ begin
|
|||
cbbUseFrameCursor.Checked := gUseFrameCursor;
|
||||
cbUseCursorBorder.Checked := gUseCursorBorder;
|
||||
tbInactivePanelBrightness.Position := gInactivePanelBrightness;
|
||||
with gColors.FreeSpaceInd^ do
|
||||
begin
|
||||
SetColorInColorBox(cbIndColor, ForeColor);
|
||||
SetColorInColorBox(cbIndBackColor, BackColor);
|
||||
SetColorInColorBox(cbIndThresholdColor, ThresholdForeColor);
|
||||
end;
|
||||
cbbUseGradientInd.Checked := gIndUseGradient;
|
||||
cbbUseFrameCursorChange(cbbUseFrameCursor);
|
||||
cbbUseInactiveSelColorChange(cbbUseInactiveSelColor);
|
||||
|
||||
|
|
@ -211,13 +206,19 @@ begin
|
|||
PreviewRightPanel.ActiveColmSlave := ColumnClass;
|
||||
PreviewRightPanel.isSlave := True;
|
||||
|
||||
with gColors.Path^ do
|
||||
begin
|
||||
SetColorInColorBox(cbPathActiveText, ActiveFontColor);
|
||||
SetColorInColorBox(cbPathActiveBack, ActiveColor);
|
||||
SetColorInColorBox(cbPathInactiveText, InactiveFontColor);
|
||||
SetColorInColorBox(cbPathInactiveBack, InactiveColor);
|
||||
end;
|
||||
|
||||
//5. Let's refresh the panel so we will show something
|
||||
RefreshPreviewPanel;
|
||||
|
||||
//6. Good. Loading is completed.
|
||||
bLoadCompleted := True;
|
||||
|
||||
pbxFakeDrive.Hint := pbxFakeDrive.Tag.ToString + '%';
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.Save }
|
||||
|
|
@ -241,12 +242,12 @@ begin
|
|||
gUseFrameCursor := cbbUseFrameCursor.Checked;
|
||||
gUseCursorBorder := cbUseCursorBorder.Checked;
|
||||
gInactivePanelBrightness := tbInactivePanelBrightness.Position;
|
||||
gIndUseGradient := cbbUseGradientInd.Checked;
|
||||
with gColors.FreeSpaceInd^ do
|
||||
with gColors.Path^ do
|
||||
begin
|
||||
ForeColor := cbIndColor.Selected;
|
||||
BackColor := cbIndBackColor.Selected;
|
||||
ThresholdForeColor := cbIndThresholdColor.Selected;
|
||||
ActiveFontColor:= cbPathActiveText.Selected;
|
||||
ActiveColor:= cbPathActiveBack.Selected;
|
||||
InactiveFontColor:= cbPathInactiveText.Selected;
|
||||
InactiveColor:= cbPathInactiveBack.Selected;
|
||||
end;
|
||||
Result := [];
|
||||
end;
|
||||
|
|
@ -273,6 +274,11 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.btnPathActiveTextClick(Sender: TObject);
|
||||
begin
|
||||
ChooseColorClick(cbPathActiveText);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.btnResetToDCDefaultClick(Sender: TObject);
|
||||
begin
|
||||
SetColorInColorBox(cbTextColor, clWindowText);
|
||||
|
|
@ -290,16 +296,16 @@ begin
|
|||
cbUseCursorBorder.Checked := False;
|
||||
SetColorInColorBox(cbCursorBorderColor, clHighlight);
|
||||
tbInactivePanelBrightness.Position := 100;
|
||||
SetColorInColorBox(cbIndColor, clSkyBlue);
|
||||
SetColorInColorBox(cbIndThresholdColor, clRed);
|
||||
SetColorInColorBox(cbIndBackColor, clWhite);
|
||||
cbbUseGradientInd.Checked := True;
|
||||
SetColorInColorBox(cbPathActiveText, clHighlightText);
|
||||
SetColorInColorBox(cbPathActiveBack, clHighlight);
|
||||
SetColorInColorBox(cbPathInactiveText, clBtnText);
|
||||
SetColorInColorBox(cbPathInactiveBack, clBtnFace);
|
||||
cbbUseFrameCursorChange(cbbUseFrameCursor);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.btnIndThresholdColorClick(Sender: TObject);
|
||||
procedure TfrmOptionsFilePanelsColors.btnPathInactiveTextClick(Sender: TObject);
|
||||
begin
|
||||
ChooseColorClick(cbIndThresholdColor);
|
||||
ChooseColorClick(cbPathInactiveText);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.cbbUseFrameCursorChange(Sender: TObject);
|
||||
|
|
@ -429,6 +435,31 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.cbPathActiveTextChange(Sender: TObject);
|
||||
begin
|
||||
PreviewLeftPanel.Header.PathLabel.ActiveFontColor:= cbPathActiveText.Selected;
|
||||
PreviewRightPanel.Header.PathLabel.ActiveFontColor:= cbPathActiveText.Selected;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.cbIndColorChange }
|
||||
procedure TfrmOptionsFilePanelsColors.cbPathActiveBackChange(Sender: TObject);
|
||||
begin
|
||||
PreviewLeftPanel.Header.PathLabel.ActiveColor:= cbPathActiveBack.Selected;
|
||||
PreviewRightPanel.Header.PathLabel.ActiveColor:= cbPathActiveBack.Selected;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.cbPathInactiveBackChange(Sender: TObject);
|
||||
begin
|
||||
PreviewLeftPanel.Header.PathLabel.InactiveColor:= cbPathInactiveBack.Selected;
|
||||
PreviewRightPanel.Header.PathLabel.InactiveColor:= cbPathInactiveBack.Selected;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.cbPathInactiveTextChange(Sender: TObject);
|
||||
begin
|
||||
PreviewLeftPanel.Header.PathLabel.InactiveFontColor:= cbPathInactiveText.Selected;
|
||||
PreviewRightPanel.Header.PathLabel.InactiveFontColor:= cbPathInactiveText.Selected;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.cbUseCursorBorderChange(Sender: TObject);
|
||||
begin
|
||||
cbCursorBorderColor.Enabled := cbUseCursorBorder.Checked and cbUseCursorBorder.Enabled;
|
||||
|
|
@ -441,13 +472,6 @@ begin
|
|||
RefreshPreviewPanel;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.pbxFakeDriveClick(Sender: TObject);
|
||||
begin
|
||||
pbxFakeDrive.Tag := (pbxFakeDrive.ScreenToClient(Mouse.CursorPos).X * 100) div pbxFakeDrive.Width;
|
||||
pbxFakeDrive.Hint := pbxFakeDrive.Tag.ToString + '%';
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.tbInactivePanelBrightnessChange }
|
||||
procedure TfrmOptionsFilePanelsColors.tbInactivePanelBrightnessChange(Sender: TObject);
|
||||
begin
|
||||
|
|
@ -460,53 +484,25 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.cbbUseGradientIndChange }
|
||||
procedure TfrmOptionsFilePanelsColors.cbbUseGradientIndChange(Sender: TObject);
|
||||
var vNoGradient: boolean;
|
||||
begin
|
||||
vNoGradient := not (cbbUseGradientInd.Checked);
|
||||
|
||||
lblIndThresholdColor.Enabled := vNoGradient;
|
||||
lblIndColor.Enabled := vNoGradient;
|
||||
lblIndBackColor.Enabled := vNoGradient;
|
||||
|
||||
cbIndThresholdColor.Enabled := vNoGradient;
|
||||
cbIndColor.Enabled := vNoGradient;
|
||||
cbIndBackColor.Enabled := vNoGradient;
|
||||
|
||||
btnIndThresholdColor.Enabled := vNoGradient;
|
||||
btnIndColor.Enabled := vNoGradient;
|
||||
btnIndBackColor.Enabled := vNoGradient;
|
||||
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.cbIndColorChange }
|
||||
procedure TfrmOptionsFilePanelsColors.cbIndColorChange(Sender: TObject);
|
||||
begin
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsFilePanelsColors.ChooseColorClick(AColorBox: TColorBox);
|
||||
begin
|
||||
optColorDialog.Color := AColorBox.Selected;
|
||||
if optColorDialog.Execute then
|
||||
begin
|
||||
SetColorInColorBox(AColorBox, optColorDialog.Color);
|
||||
pbxFakeDrive.Repaint;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.btnIndColorClick }
|
||||
procedure TfrmOptionsFilePanelsColors.btnIndColorClick(Sender: TObject);
|
||||
procedure TfrmOptionsFilePanelsColors.btnPathActiveBackClick(Sender: TObject);
|
||||
begin
|
||||
ChooseColorClick(cbIndColor);
|
||||
ChooseColorClick(cbPathActiveBack);
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.btnIndBackColorClick }
|
||||
procedure TfrmOptionsFilePanelsColors.btnIndBackColorClick(Sender: TObject);
|
||||
procedure TfrmOptionsFilePanelsColors.btnPathInactiveBackClick(Sender: TObject);
|
||||
begin
|
||||
ChooseColorClick(cbIndBackColor);
|
||||
ChooseColorClick(cbPathInactiveBack);
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.RefreshPreviewPanel }
|
||||
|
|
@ -553,13 +549,6 @@ begin
|
|||
PreviewRightPanel.UpdateColumnsView;
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.pbxFakeDrivePaint }
|
||||
procedure TfrmOptionsFilePanelsColors.pbxFakeDrivePaint(Sender: TObject);
|
||||
begin
|
||||
frmMain.PaintDriveFreeBar(pbxFakeDrive, cbbUseGradientInd.Checked,
|
||||
cbIndColor.Selected, cbIndThresholdColor.Selected, cbIndBackColor.Selected);
|
||||
end;
|
||||
|
||||
{ TfrmOptionsFilePanelsColors.pnlLeftPreviewEnter }
|
||||
procedure TfrmOptionsFilePanelsColors.pnlLeftPreviewEnter(Sender: TObject);
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -185,10 +185,8 @@ uses
|
|||
fOptionsFileAssoc,
|
||||
fOptionsFileAssocExtra,
|
||||
fOptionsDirectoryHotlist,
|
||||
fOptionsDirectoryHotlistExtra
|
||||
{$IFDEF DARKWIN}
|
||||
, fOptionsColors
|
||||
{$ENDIF}
|
||||
fOptionsDirectoryHotlistExtra,
|
||||
fOptionsColors
|
||||
;
|
||||
|
||||
{ TOptionsEditorRec }
|
||||
|
|
@ -373,11 +371,7 @@ begin
|
|||
Tools.Add(TfrmOptionsDiffer);
|
||||
Tools.Add(TfrmOptionsTerminal);
|
||||
Main.Add(TfrmOptionsFonts);
|
||||
{$IFDEF DARKWIN}
|
||||
Colors := Main.Add(TfrmOptionsColors);
|
||||
{$ELSE}
|
||||
Colors := Main.Add(TOptionsColorsGroup);
|
||||
{$ENDIF}
|
||||
Colors.Add(TfrmOptionsFilePanelsColors);
|
||||
Colors.Add(TfrmOptionsFileTypesColors);
|
||||
Keyboard := Main.Add(TfrmOptionsKeyboard);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Options groups
|
||||
|
||||
Copyright (C) 2006-2011 Koblov Alexander (Alexx2000@mail.ru)
|
||||
Copyright (C) 2006-2023 Koblov Alexander (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
|
||||
|
|
@ -39,14 +39,6 @@ type
|
|||
class function IsEmpty: Boolean; override;
|
||||
end;
|
||||
|
||||
{ TOptionsColorsGroup }
|
||||
|
||||
TOptionsColorsGroup = class(TOptionsGroup)
|
||||
public
|
||||
class function GetIconIndex: Integer; override;
|
||||
class function GetTitle: String; override;
|
||||
end;
|
||||
|
||||
{ TOptionsToolsGroup }
|
||||
|
||||
TOptionsToolsGroup = class(TOptionsGroup)
|
||||
|
|
@ -79,17 +71,5 @@ begin
|
|||
Result := rsOptionsEditorTools;
|
||||
end;
|
||||
|
||||
{ TOptionsColorsGroup }
|
||||
|
||||
class function TOptionsColorsGroup.GetIconIndex: Integer;
|
||||
begin
|
||||
Result := 4;
|
||||
end;
|
||||
|
||||
class function TOptionsColorsGroup.GetTitle: String;
|
||||
begin
|
||||
Result := rsOptionsEditorColors;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,226 +6,68 @@ inherited frmOptionsViewer: TfrmOptionsViewer
|
|||
ClientWidth = 586
|
||||
DesignLeft = 384
|
||||
DesignTop = 288
|
||||
inherited edtToolsParameters: TEdit
|
||||
Top = 113
|
||||
end
|
||||
inherited fneToolsPath: TFileNameEdit
|
||||
Top = 61
|
||||
end
|
||||
inherited lblToolsPath: TLabel
|
||||
Height = 15
|
||||
Width = 144
|
||||
end
|
||||
inherited lblToolsParameters: TLabel
|
||||
Height = 15
|
||||
Top = 94
|
||||
Width = 117
|
||||
Width = 145
|
||||
end
|
||||
inherited cbToolsKeepTerminalOpen: TCheckBox
|
||||
Top = 169
|
||||
Width = 297
|
||||
end
|
||||
inherited cbToolsRunInTerminal: TCheckBox
|
||||
Top = 148
|
||||
Width = 119
|
||||
end
|
||||
inherited btnRelativeToolPath: TSpeedButton
|
||||
Top = 61
|
||||
inherited cbToolsUseExternalProgram: TCheckBox
|
||||
Width = 131
|
||||
end
|
||||
object gbViewerBookMode: TGroupBox[8]
|
||||
object gbInternalViewer: TGroupBox[8]
|
||||
AnchorSideLeft.Control = fneToolsPath
|
||||
AnchorSideTop.Control = cbToolsKeepTerminalOpen
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = fneToolsPath
|
||||
AnchorSideRight.Control = edtToolsParameters
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 250
|
||||
Height = 55
|
||||
Top = 200
|
||||
Width = 525
|
||||
Width = 571
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 12
|
||||
BorderSpacing.Bottom = 10
|
||||
Caption = 'Viewer Book Mode'
|
||||
Caption = 'Internal viewer options'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ClientHeight = 230
|
||||
ClientWidth = 521
|
||||
ChildSizing.HorizontalSpacing = 3
|
||||
ClientHeight = 48
|
||||
ClientWidth = 569
|
||||
TabOrder = 5
|
||||
object lblBackgroundColorViewerBook: TLabel
|
||||
AnchorSideTop.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = cbBackgroundColorViewerBook
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 12
|
||||
Width = 174
|
||||
Caption = '&Background color in book viewer'
|
||||
FocusControl = cbBackgroundColorViewerBook
|
||||
ParentColor = False
|
||||
end
|
||||
object seNumberColumnsViewer: TSpinEdit
|
||||
AnchorSideLeft.Control = cbFontColorViewerBook
|
||||
AnchorSideTop.Control = cbFontColorViewerBook
|
||||
AnchorSideLeft.Control = lblNumberColumnsViewer
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 202
|
||||
Left = 211
|
||||
Height = 23
|
||||
Top = 62
|
||||
Width = 36
|
||||
Top = 6
|
||||
Width = 50
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Top = 5
|
||||
MaxValue = 3
|
||||
MinValue = 1
|
||||
OnChange = seNumberColumnsViewerChange
|
||||
TabOrder = 5
|
||||
TabOrder = 0
|
||||
Value = 1
|
||||
end
|
||||
object lblNumberColumnsViewer: TLabel
|
||||
AnchorSideLeft.Control = lblBackgroundColorViewerBook
|
||||
AnchorSideTop.Control = seNumberColumnsViewer
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 66
|
||||
Top = 10
|
||||
Width = 187
|
||||
Caption = '&Number of columns in book viewer'
|
||||
FocusControl = seNumberColumnsViewer
|
||||
ParentColor = False
|
||||
end
|
||||
object gbViewerExample: TGroupBox
|
||||
AnchorSideLeft.Control = gbViewerBookMode
|
||||
AnchorSideTop.Control = lblNumberColumnsViewer
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbViewerBookMode
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = seNumberColumnsViewer
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 135
|
||||
Top = 89
|
||||
Width = 505
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 8
|
||||
Caption = 'Example'
|
||||
ClientHeight = 115
|
||||
ClientWidth = 501
|
||||
TabOrder = 4
|
||||
object pbViewerBook: TPaintBox
|
||||
Left = 5
|
||||
Height = 105
|
||||
Top = 5
|
||||
Width = 491
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 5
|
||||
OnPaint = pbViewerBookPaint
|
||||
end
|
||||
end
|
||||
object btnFontViewerColor: TButton
|
||||
AnchorSideLeft.Control = cbFontColorViewerBook
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbFontColorViewerBook
|
||||
AnchorSideRight.Control = btnBackViewerColor
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = cbFontColorViewerBook
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 481
|
||||
Height = 22
|
||||
Top = 35
|
||||
Width = 24
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
Caption = '>>'
|
||||
OnClick = btnFontViewerColorClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object btnBackViewerColor: TButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideBottom.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 481
|
||||
Height = 22
|
||||
Top = 8
|
||||
Width = 24
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 5
|
||||
Caption = '>>'
|
||||
OnClick = btnBackViewerColorClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object cbFontColorViewerBook: TColorBox
|
||||
AnchorSideLeft.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideTop.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = cbBackgroundColorViewerBook
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 202
|
||||
Height = 22
|
||||
Top = 35
|
||||
Width = 275
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 5
|
||||
ItemHeight = 16
|
||||
OnChange = cbColorBoxChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object lblFontColorViewerBook: TLabel
|
||||
AnchorSideLeft.Control = lblBackgroundColorViewerBook
|
||||
AnchorSideTop.Control = cbFontColorViewerBook
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 39
|
||||
Width = 134
|
||||
BorderSpacing.Top = 10
|
||||
Caption = '&Font color in book viewer'
|
||||
FocusControl = cbFontColorViewerBook
|
||||
ParentColor = False
|
||||
end
|
||||
object cbBackgroundColorViewerBook: TColorBox
|
||||
AnchorSideLeft.Control = lblBackgroundColorViewerBook
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = btnBackViewerColor
|
||||
Left = 202
|
||||
Height = 22
|
||||
Top = 8
|
||||
Width = 275
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 20
|
||||
ItemHeight = 16
|
||||
OnChange = cbColorBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
inherited pmPathHelper: TPopupMenu[9]
|
||||
left = 528
|
||||
top = 168
|
||||
end
|
||||
object optColorDialog: TColorDialog[10]
|
||||
Color = clBlack
|
||||
CustomColors.Strings = (
|
||||
'ColorA=000000'
|
||||
'ColorB=000080'
|
||||
'ColorC=008000'
|
||||
'ColorD=008080'
|
||||
'ColorE=800000'
|
||||
'ColorF=800080'
|
||||
'ColorG=808000'
|
||||
'ColorH=808080'
|
||||
'ColorI=C0C0C0'
|
||||
'ColorJ=0000FF'
|
||||
'ColorK=00FF00'
|
||||
'ColorL=00FFFF'
|
||||
'ColorM=FF0000'
|
||||
'ColorN=FF00FF'
|
||||
'ColorO=FFFF00'
|
||||
'ColorP=FFFFFF'
|
||||
'ColorQ=C0DCC0'
|
||||
'ColorR=F0CAA6'
|
||||
'ColorS=F0FBFF'
|
||||
'ColorT=A4A0A0'
|
||||
)
|
||||
left = 16
|
||||
top = 128
|
||||
Left = 520
|
||||
Top = 152
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
{"version":1,"strings":[
|
||||
{"hash":135712005,"name":"tfrmoptionsviewer.gbviewerbookmode.caption","sourcebytes":[86,105,101,119,101,114,32,66,111,111,107,32,77,111,100,101],"value":"Viewer Book Mode"},
|
||||
{"hash":179221570,"name":"tfrmoptionsviewer.lblbackgroundcolorviewerbook.caption","sourcebytes":[38,66,97,99,107,103,114,111,117,110,100,32,99,111,108,111,114,32,105,110,32,98,111,111,107,32,118,105,101,119,101,114],"value":"&Background color in book viewer"},
|
||||
{"hash":70997378,"name":"tfrmoptionsviewer.lblnumbercolumnsviewer.caption","sourcebytes":[38,78,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,110,32,98,111,111,107,32,118,105,101,119,101,114],"value":"&Number of columns in book viewer"},
|
||||
{"hash":216549221,"name":"tfrmoptionsviewer.gbviewerexample.caption","sourcebytes":[69,120,97,109,112,108,101],"value":"Example"},
|
||||
{"hash":1054,"name":"tfrmoptionsviewer.btnfontviewercolor.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":1054,"name":"tfrmoptionsviewer.btnbackviewercolor.caption","sourcebytes":[62,62],"value":">>"},
|
||||
{"hash":250825426,"name":"tfrmoptionsviewer.lblfontcolorviewerbook.caption","sourcebytes":[38,70,111,110,116,32,99,111,108,111,114,32,105,110,32,98,111,111,107,32,118,105,101,119,101,114],"value":"&Font color in book viewer"}
|
||||
{"hash":10525987,"name":"tfrmoptionsviewer.gbinternalviewer.caption","sourcebytes":[73,110,116,101,114,110,97,108,32,118,105,101,119,101,114,32,111,112,116,105,111,110,115],"value":"Internal viewer options"},
|
||||
{"hash":70997378,"name":"tfrmoptionsviewer.lblnumbercolumnsviewer.caption","sourcebytes":[38,78,117,109,98,101,114,32,111,102,32,99,111,108,117,109,110,115,32,105,110,32,98,111,111,107,32,118,105,101,119,101,114],"value":"&Number of columns in book viewer"}
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Tools options page
|
||||
|
||||
Copyright (C) 2006-2014 Koblov Alexander (Alexx2000@mail.ru)
|
||||
Copyright (C) 2006-2023 Koblov Alexander (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
|
||||
|
|
@ -28,38 +28,20 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, StdCtrls, Spin, ExtCtrls, ColorBox, Dialogs, Types,
|
||||
LMessages, fOptionsFrame, fOptionsToolBase;
|
||||
fOptionsFrame, fOptionsToolBase;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmOptionsViewer }
|
||||
|
||||
TfrmOptionsViewer = class(TfrmOptionsToolBase)
|
||||
btnBackViewerColor: TButton;
|
||||
btnFontViewerColor: TButton;
|
||||
cbBackgroundColorViewerBook: TColorBox;
|
||||
cbFontColorViewerBook: TColorBox;
|
||||
gbViewerBookMode: TGroupBox;
|
||||
gbViewerExample: TGroupBox;
|
||||
lblBackgroundColorViewerBook: TLabel;
|
||||
lblFontColorViewerBook: TLabel;
|
||||
gbInternalViewer: TGroupBox;
|
||||
lblNumberColumnsViewer: TLabel;
|
||||
optColorDialog: TColorDialog;
|
||||
pbViewerBook: TPaintBox;
|
||||
seNumberColumnsViewer: TSpinEdit;
|
||||
procedure btnBackViewerColorClick(Sender: TObject);
|
||||
procedure btnFontViewerColorClick(Sender: TObject);
|
||||
procedure cbColorBoxChange(Sender: TObject);
|
||||
procedure seNumberColumnsViewerChange(Sender: TObject);
|
||||
procedure pbViewerBookPaint(Sender: TObject);
|
||||
private
|
||||
FPreviewTextSize: TSize;
|
||||
procedure UseExternalProgramChanged(Sender: TObject);
|
||||
protected
|
||||
procedure Init; override;
|
||||
procedure Load; override;
|
||||
function Save: TOptionsEditorSaveFlags; override;
|
||||
procedure CMThemeChanged(var Message: TLMessage); message CM_THEMECHANGED;
|
||||
public
|
||||
class function GetIconIndex: Integer; override;
|
||||
class function GetTitle: String; override;
|
||||
|
|
@ -70,67 +52,10 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
uDCUtils, uGlobs, uLng;
|
||||
|
||||
const
|
||||
ViewerBookPreviewText = 'Text';
|
||||
uGlobs, uLng;
|
||||
|
||||
{ TfrmOptionsViewer }
|
||||
|
||||
procedure TfrmOptionsViewer.btnBackViewerColorClick(Sender: TObject);
|
||||
begin
|
||||
optColorDialog.Color:= cbBackgroundColorViewerBook.Selected;
|
||||
if optColorDialog.Execute then
|
||||
begin
|
||||
SetColorInColorBox(cbBackgroundColorViewerBook, optColorDialog.Color);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.btnFontViewerColorClick(Sender: TObject);
|
||||
begin
|
||||
optColorDialog.Color:= cbFontColorViewerBook.Selected;
|
||||
if optColorDialog.Execute then
|
||||
begin
|
||||
SetColorInColorBox(cbFontColorViewerBook, optColorDialog.Color);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.cbColorBoxChange(Sender: TObject);
|
||||
begin
|
||||
pbViewerBook.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.seNumberColumnsViewerChange(Sender: TObject);
|
||||
begin
|
||||
pbViewerBook.Repaint;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.pbViewerBookPaint(Sender: TObject);
|
||||
var
|
||||
i, numb: integer;
|
||||
begin
|
||||
with pbViewerBook.Canvas do
|
||||
begin
|
||||
Brush.Color := cbBackgroundColorViewerBook.Selected;
|
||||
Font.Color := cbFontColorViewerBook.Selected;
|
||||
FillRect(0, 0, pbViewerBook.Width, pbViewerBook.Height);
|
||||
for i:= 0 to seNumberColumnsViewer.Value - 1 do
|
||||
begin
|
||||
for numb:= 0 to 1 do
|
||||
TextOut(i * (FPreviewTextSize.cx + 5) + 5,
|
||||
FPreviewTextSize.cy * numb + 4, ViewerBookPreviewText);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.UseExternalProgramChanged(Sender: TObject);
|
||||
begin
|
||||
gbViewerBookMode.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
lblBackgroundColorViewerBook.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
lblNumberColumnsViewer.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
lblFontColorViewerBook.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
end;
|
||||
|
||||
class function TfrmOptionsViewer.GetIconIndex: Integer;
|
||||
begin
|
||||
Result := 22;
|
||||
|
|
@ -144,43 +69,20 @@ end;
|
|||
procedure TfrmOptionsViewer.Init;
|
||||
begin
|
||||
ExternalTool := etViewer;
|
||||
OnUseExternalProgramChange := @UseExternalProgramChanged;
|
||||
gbViewerBookMode.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
pbViewerBook.Font.Name := gFonts[dcfViewerBook].Name;
|
||||
pbViewerBook.Font.Size := gFonts[dcfViewerBook].Size;
|
||||
pbViewerBook.Font.Style := gFonts[dcfViewerBook].Style;
|
||||
|
||||
inherited Init;
|
||||
|
||||
FPreviewTextSize := pbViewerBook.Canvas.TextExtent(ViewerBookPreviewText);
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.Load;
|
||||
begin
|
||||
inherited;
|
||||
inherited Load;
|
||||
seNumberColumnsViewer.Value := gColCount;
|
||||
with gColors.Viewer^ do
|
||||
begin
|
||||
SetColorInColorBox(cbBackgroundColorViewerBook, BookBackgroundColor);
|
||||
SetColorInColorBox(cbFontColorViewerBook, BookFontColor);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmOptionsViewer.Save: TOptionsEditorSaveFlags;
|
||||
begin
|
||||
Result := inherited;
|
||||
Result := inherited Save;
|
||||
gColCount := seNumberColumnsViewer.Value;
|
||||
with gColors.Viewer^ do
|
||||
begin
|
||||
BookBackgroundColor := cbBackgroundColorViewerBook.Selected;
|
||||
BookFontColor := cbFontColorViewerBook.Selected;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmOptionsViewer.CMThemeChanged(var Message: TLMessage);
|
||||
begin
|
||||
LoadSettings;
|
||||
pbViewerBook.Repaint;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
inherited frmOptionsEditor: TfrmOptionsEditor
|
||||
Height = 513
|
||||
Width = 601
|
||||
Width = 586
|
||||
HelpKeyword = '/configuration.html#ConfigToolsEditor'
|
||||
ClientHeight = 513
|
||||
ClientWidth = 601
|
||||
ClientWidth = 586
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
DesignLeft = 117
|
||||
|
|
|
|||
|
|
@ -804,8 +804,11 @@ resourcestring
|
|||
rsOptConfigTreeState = 'Full expand;Full collapse';
|
||||
rsOptDifferFramePosition = 'Active frame panel on left, inactive on right (legacy);Left frame panel on left, right on right';
|
||||
//-------------------------------
|
||||
rsDarkMode = 'Dark mode';
|
||||
rsDarkModeOptions = 'Auto;Enabled;Disabled';
|
||||
//-------------------------------
|
||||
rsDriveFreeSpaceIndicator = 'Drive Free Space Indicator';
|
||||
//-------------------------------
|
||||
rsOptEnterExt = 'Enter extension';
|
||||
rsOptAssocPluginWith = 'Associate plugin "%s" with:';
|
||||
rsOptMouseSelectionButton = 'Left button;Right button;';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue