UPD: Tree View Menu Color options page - use KASColorBoxButton

This commit is contained in:
Alexander Koblov 2023-07-19 13:43:20 +03:00
commit 3d0d88c498
3 changed files with 127 additions and 401 deletions

View file

@ -20,7 +20,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 371
Height = 407
Top = 10
Width = 588
Anchors = [akTop, akLeft, akRight]
@ -29,7 +29,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
Caption = 'Layout and colors options:'
ChildSizing.LeftRightSpacing = 10
ChildSizing.TopBottomSpacing = 6
ClientHeight = 351
ClientHeight = 387
ClientWidth = 584
TabOrder = 0
object cbkUsageKeyboardShortcut: TCheckBox
@ -38,7 +38,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
Left = 10
Height = 19
Top = 6
Width = 303
Width = 301
Caption = 'Use and display keyboard shortcut for choosing items'
OnChange = RefreshColorOfOurSampleClick
TabOrder = 0
@ -51,45 +51,28 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 59
Height = 15
Top = 33
Top = 34
Width = 97
Anchors = [akTop, akRight]
Caption = 'Background color:'
FocusControl = cbBackgroundColor
ParentColor = False
end
object cbBackgroundColor: TColorBox
object cbBackgroundColor: TKASColorBoxButton
Tag = 1
AnchorSideLeft.Control = gbLayoutAndColors
AnchorSideTop.Control = cbkUsageKeyboardShortcut
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Height = 25
Top = 29
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Width = 125
TabOrder = 1
BorderSpacing.Left = 160
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 1
end
object btnBackgroundColor: TButton
Tag = 1
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideTop.Control = cbBackgroundColor
AnchorSideTop.Side = asrCenter
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 29
Width = 28
BorderSpacing.Right = 10
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 2
ColorDialog = optColorDialog
end
object lblShortcutColor: TLabel
Tag = 2
@ -98,7 +81,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbShortcutColor
Left = 78
Height = 15
Top = 61
Top = 65
Width = 78
Anchors = [akTop, akRight]
BorderSpacing.Right = 4
@ -106,7 +89,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
FocusControl = cbShortcutColor
ParentColor = False
end
object cbShortcutColor: TColorBox
object cbShortcutColor: TKASColorBoxButton
Tag = 2
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbBackgroundColor
@ -114,31 +97,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 57
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 60
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 2
BorderSpacing.Top = 6
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 3
end
object btnShortcutColor: TButton
Tag = 2
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideTop.Control = cbShortcutColor
AnchorSideTop.Side = asrCenter
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 57
Width = 28
BorderSpacing.Right = 10
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 4
ColorDialog = optColorDialog
end
object lblNormalTextColor: TLabel
Tag = 3
@ -148,14 +114,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 60
Height = 15
Top = 89
Top = 96
Width = 96
Anchors = [akTop, akRight]
Caption = 'Normal text color:'
FocusControl = cbNormalTextColor
ParentColor = False
end
object cbNormalTextColor: TColorBox
object cbNormalTextColor: TKASColorBoxButton
Tag = 3
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbShortcutColor
@ -163,34 +129,15 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 85
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 91
Width = 125
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
TabOrder = 3
Constraints.MinWidth = 100
ItemHeight = 16
BorderSpacing.Top = 6
OnChange = RefreshColorOfOurSampleClick
TabOrder = 5
end
object btnNormalTextColor: TButton
Tag = 3
AnchorSideLeft.Control = cbNormalTextColor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbNormalTextColor
AnchorSideBottom.Control = cbNormalTextColor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 85
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 6
ColorDialog = optColorDialog
end
object lblSecondaryTextColor: TLabel
Tag = 4
@ -200,14 +147,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 45
Height = 15
Top = 117
Top = 127
Width = 111
Anchors = [akTop, akRight]
Caption = 'Secondary text color:'
FocusControl = cbSecondaryTextColor
ParentColor = False
end
object cbSecondaryTextColor: TColorBox
object cbSecondaryTextColor: TKASColorBoxButton
Tag = 4
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbNormalTextColor
@ -215,34 +162,15 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 113
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 122
Width = 125
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
TabOrder = 4
Constraints.MinWidth = 100
ItemHeight = 16
BorderSpacing.Top = 6
OnChange = RefreshColorOfOurSampleClick
TabOrder = 7
end
object btnSecondaryTextColor: TButton
Tag = 4
AnchorSideLeft.Control = cbSecondaryTextColor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbSecondaryTextColor
AnchorSideBottom.Control = cbSecondaryTextColor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 113
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 8
ColorDialog = optColorDialog
end
object lblFoundTextColor: TLabel
Tag = 5
@ -252,14 +180,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 66
Height = 15
Top = 143
Top = 156
Width = 90
Anchors = [akTop, akRight]
Caption = 'Found text color:'
FocusControl = cbFoundTextColor
ParentColor = False
end
object cbFoundTextColor: TColorBox
object cbFoundTextColor: TKASColorBoxButton
Tag = 5
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbSecondaryTextColor
@ -267,32 +195,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 139
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 151
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 5
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 9
end
object btnFoundTextColor: TButton
Tag = 5
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideTop.Control = cbFoundTextColor
AnchorSideBottom.Control = cbFoundTextColor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 139
Width = 28
Anchors = [akLeft, akBottom]
BorderSpacing.Right = 10
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 10
ColorDialog = optColorDialog
end
object lblUnselectableTextColor: TLabel
Tag = 6
@ -302,14 +212,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 33
Height = 15
Top = 169
Top = 185
Width = 123
Anchors = [akTop, akRight]
Caption = 'Unselectable text color:'
FocusControl = cbUnselectableTextColor
ParentColor = False
end
object cbUnselectableTextColor: TColorBox
object cbUnselectableTextColor: TKASColorBoxButton
Tag = 6
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbFoundTextColor
@ -317,32 +227,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 165
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 180
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 6
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 11
end
object btnUnselectableTextColor: TButton
Tag = 6
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideTop.Control = cbUnselectableTextColor
AnchorSideBottom.Control = cbUnselectableTextColor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 165
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Right = 10
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 12
ColorDialog = optColorDialog
end
object lblCursorColor: TLabel
Tag = 7
@ -352,14 +244,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 88
Height = 15
Top = 195
Top = 214
Width = 68
Anchors = [akTop, akRight]
Caption = 'Cursor color:'
FocusControl = cbCursorColor
ParentColor = False
end
object cbCursorColor: TColorBox
object cbCursorColor: TKASColorBoxButton
Tag = 7
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbUnselectableTextColor
@ -367,32 +259,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 191
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 209
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 7
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 13
end
object btnCursorColor: TButton
Tag = 7
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideTop.Control = cbCursorColor
AnchorSideBottom.Control = cbCursorColor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 191
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Right = 10
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 14
ColorDialog = optColorDialog
end
object lblShortcutUnderCursor: TLabel
Tag = 8
@ -402,14 +276,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 38
Height = 15
Top = 221
Top = 243
Width = 118
Anchors = [akTop, akRight]
Caption = 'Shortcut under cursor:'
FocusControl = cbShortcutUnderCursor
ParentColor = False
end
object cbShortcutUnderCursor: TColorBox
object cbShortcutUnderCursor: TKASColorBoxButton
Tag = 8
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbCursorColor
@ -417,33 +291,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 217
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 238
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 8
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 15
end
object btnShortcutUnderCursor: TButton
Tag = 8
AnchorSideLeft.Control = cbShortcutUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbShortcutUnderCursor
AnchorSideBottom.Control = cbShortcutUnderCursor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 217
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 16
ColorDialog = optColorDialog
end
object lblNormalTextUnderCursor: TLabel
Tag = 9
@ -453,14 +308,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 20
Height = 15
Top = 247
Top = 272
Width = 136
Anchors = [akTop, akRight]
Caption = 'Normal text under cursor:'
FocusControl = cbNormalTextUnderCursor
ParentColor = False
end
object cbNormalTextUnderCursor: TColorBox
object cbNormalTextUnderCursor: TKASColorBoxButton
Tag = 9
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbShortcutUnderCursor
@ -468,33 +323,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 243
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 267
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 9
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 17
end
object btnNormalTextUnderCursor: TButton
Tag = 9
AnchorSideLeft.Control = cbNormalTextUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbNormalTextUnderCursor
AnchorSideBottom.Control = cbNormalTextUnderCursor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 243
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 18
ColorDialog = optColorDialog
end
object lblSecondaryTextUnderCursor: TLabel
Tag = 10
@ -504,14 +340,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 5
Height = 15
Top = 275
Top = 303
Width = 151
Anchors = [akTop, akRight]
Caption = 'Secondary text under cursor:'
FocusControl = cbSecondaryTextUnderCursor
ParentColor = False
end
object cbSecondaryTextUnderCursor: TColorBox
object cbSecondaryTextUnderCursor: TKASColorBoxButton
Tag = 10
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbNormalTextUnderCursor
@ -519,34 +355,15 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 271
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 298
Width = 125
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
TabOrder = 10
Constraints.MinWidth = 100
ItemHeight = 16
BorderSpacing.Top = 6
OnChange = RefreshColorOfOurSampleClick
TabOrder = 19
end
object btnSecondaryTextUnderCursor: TButton
Tag = 10
AnchorSideLeft.Control = cbSecondaryTextUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbSecondaryTextUnderCursor
AnchorSideBottom.Control = cbSecondaryTextUnderCursor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 271
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 20
ColorDialog = optColorDialog
end
object lblFoundTextUnderCursor: TLabel
Tag = 11
@ -556,14 +373,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 26
Height = 15
Top = 301
Top = 332
Width = 130
Anchors = [akTop, akRight]
Caption = 'Found text under cursor:'
FocusControl = cbFoundTextUnderCursor
ParentColor = False
end
object cbFoundTextUnderCursor: TColorBox
object cbFoundTextUnderCursor: TKASColorBoxButton
Tag = 11
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbSecondaryTextUnderCursor
@ -571,33 +388,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 297
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 327
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 11
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 21
end
object btnFoundTextUnderCursor: TButton
Tag = 11
AnchorSideLeft.Control = cbFoundTextUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbFoundTextUnderCursor
AnchorSideBottom.Control = cbFoundTextUnderCursor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 297
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 22
ColorDialog = optColorDialog
end
object lblUnselectableUnderCursor: TLabel
Tag = 12
@ -607,14 +405,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 16
Height = 15
Top = 327
Top = 361
Width = 140
Anchors = [akTop, akRight]
Caption = 'Unselectable under cursor:'
FocusControl = cbUnselectableUnderCursor
ParentColor = False
end
object cbUnselectableUnderCursor: TColorBox
object cbUnselectableUnderCursor: TKASColorBoxButton
Tag = 12
AnchorSideLeft.Control = cbBackgroundColor
AnchorSideTop.Control = cbFoundTextUnderCursor
@ -622,33 +420,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Control = cbBackgroundColor
AnchorSideRight.Side = asrBottom
Left = 160
Height = 22
Top = 323
Width = 200
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
Height = 25
Top = 356
Width = 125
Anchors = [akTop, akLeft, akRight]
TabOrder = 12
BorderSpacing.Top = 4
ItemHeight = 16
OnChange = RefreshColorOfOurSampleClick
TabOrder = 23
end
object btnUnselectableUnderCursor: TButton
Tag = 12
AnchorSideLeft.Control = cbUnselectableUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbUnselectableUnderCursor
AnchorSideBottom.Control = cbUnselectableUnderCursor
AnchorSideBottom.Side = asrBottom
Left = 366
Height = 22
Top = 323
Width = 28
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = '>>'
OnClick = btnChooseColorClick
TabOrder = 24
ColorDialog = optColorDialog
end
object lblPreview: TLabel
AnchorSideLeft.Control = TreeViewMenuSample
@ -656,10 +435,10 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = TreeViewMenuSample
AnchorSideRight.Side = asrBottom
Left = 404
Left = 295
Height = 15
Top = 8
Width = 170
Width = 279
Alignment = taCenter
Anchors = [akTop, akLeft, akRight]
Caption = 'Tree View Menu Preview:'
@ -668,7 +447,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
Transparent = False
end
object TreeViewMenuSample: TTreeView
AnchorSideLeft.Control = btnNormalTextColor
AnchorSideLeft.Control = cbNormalTextUnderCursor
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblPreview
AnchorSideTop.Side = asrBottom
@ -676,18 +455,18 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = gbLayoutAndColors
AnchorSideBottom.Side = asrBottom
Left = 404
Height = 322
Left = 295
Height = 358
Hint = 'Change color on left and you''ll see here a preview of what your Tree View Menus will look likes with this sample.'
Top = 23
Width = 170
Width = 279
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 10
BackgroundColor = clBtnFace
Color = clBtnFace
ReadOnly = True
ScrollBars = ssNone
TabOrder = 25
TabOrder = 13
OnMouseWheelDown = TreeViewMenuSampleMouseWheelDown
OnMouseWheelUp = TreeViewMenuSampleMouseWheelUp
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
@ -701,7 +480,7 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
AnchorSideRight.Side = asrBottom
Left = 6
Height = 55
Top = 381
Top = 417
Width = 588
Anchors = [akTop, akLeft, akRight]
AutoSize = True
@ -779,14 +558,14 @@ inherited frmOptionsTreeViewMenuColor: TfrmOptionsTreeViewMenuColor
'ColorS=F0FBFF'
'ColorT=A4A0A0'
)
left = 488
top = 288
Left = 488
Top = 288
end
object dlgFnt: TFontDialog[3]
MinFontSize = 0
MaxFontSize = 0
Options = [fdNoStyleSel]
left = 416
top = 344
Left = 416
Top = 344
end
end

View file

@ -2,29 +2,17 @@
{"hash":159890218,"name":"tfrmoptionstreeviewmenucolor.gblayoutandcolors.caption","sourcebytes":[76,97,121,111,117,116,32,97,110,100,32,99,111,108,111,114,115,32,111,112,116,105,111,110,115,58],"value":"Layout and colors options:"},
{"hash":31991555,"name":"tfrmoptionstreeviewmenucolor.cbkusagekeyboardshortcut.caption","sourcebytes":[85,115,101,32,97,110,100,32,100,105,115,112,108,97,121,32,107,101,121,98,111,97,114,100,32,115,104,111,114,116,99,117,116,32,102,111,114,32,99,104,111,111,115,105,110,103,32,105,116,101,109,115],"value":"Use and display keyboard shortcut for choosing items"},
{"hash":140314666,"name":"tfrmoptionstreeviewmenucolor.lblbackgroundcolor.caption","sourcebytes":[66,97,99,107,103,114,111,117,110,100,32,99,111,108,111,114,58],"value":"Background color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnbackgroundcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":2155466,"name":"tfrmoptionstreeviewmenucolor.lblshortcutcolor.caption","sourcebytes":[83,104,111,114,116,99,117,116,32,99,111,108,111,114,58],"value":"Shortcut color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnshortcutcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":231377482,"name":"tfrmoptionstreeviewmenucolor.lblnormaltextcolor.caption","sourcebytes":[78,111,114,109,97,108,32,116,101,120,116,32,99,111,108,111,114,58],"value":"Normal text color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnnormaltextcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":127674394,"name":"tfrmoptionstreeviewmenucolor.lblsecondarytextcolor.caption","sourcebytes":[83,101,99,111,110,100,97,114,121,32,116,101,120,116,32,99,111,108,111,114,58],"value":"Secondary text color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnsecondarytextcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":11769210,"name":"tfrmoptionstreeviewmenucolor.lblfoundtextcolor.caption","sourcebytes":[70,111,117,110,100,32,116,101,120,116,32,99,111,108,111,114,58],"value":"Found text color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnfoundtextcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":261168186,"name":"tfrmoptionstreeviewmenucolor.lblunselectabletextcolor.caption","sourcebytes":[85,110,115,101,108,101,99,116,97,98,108,101,32,116,101,120,116,32,99,111,108,111,114,58],"value":"Unselectable text color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnunselectabletextcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":208506970,"name":"tfrmoptionstreeviewmenucolor.lblcursorcolor.caption","sourcebytes":[67,117,114,115,111,114,32,99,111,108,111,114,58],"value":"Cursor color:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btncursorcolor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":153885482,"name":"tfrmoptionstreeviewmenucolor.lblshortcutundercursor.caption","sourcebytes":[83,104,111,114,116,99,117,116,32,117,110,100,101,114,32,99,117,114,115,111,114,58],"value":"Shortcut under cursor:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnshortcutundercursor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":4629498,"name":"tfrmoptionstreeviewmenucolor.lblnormaltextundercursor.caption","sourcebytes":[78,111,114,109,97,108,32,116,101,120,116,32,117,110,100,101,114,32,99,117,114,115,111,114,58],"value":"Normal text under cursor:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnnormaltextundercursor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":23119450,"name":"tfrmoptionstreeviewmenucolor.lblsecondarytextundercursor.caption","sourcebytes":[83,101,99,111,110,100,97,114,121,32,116,101,120,116,32,117,110,100,101,114,32,99,117,114,115,111,114,58],"value":"Secondary text under cursor:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnsecondarytextundercursor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":66678826,"name":"tfrmoptionstreeviewmenucolor.lblfoundtextundercursor.caption","sourcebytes":[70,111,117,110,100,32,116,101,120,116,32,117,110,100,101,114,32,99,117,114,115,111,114,58],"value":"Found text under cursor:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnfoundtextundercursor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":258370346,"name":"tfrmoptionstreeviewmenucolor.lblunselectableundercursor.caption","sourcebytes":[85,110,115,101,108,101,99,116,97,98,108,101,32,117,110,100,101,114,32,99,117,114,115,111,114,58],"value":"Unselectable under cursor:"},
{"hash":1054,"name":"tfrmoptionstreeviewmenucolor.btnunselectableundercursor.caption","sourcebytes":[62,62],"value":">>"},
{"hash":251513754,"name":"tfrmoptionstreeviewmenucolor.lblpreview.caption","sourcebytes":[84,114,101,101,32,86,105,101,119,32,77,101,110,117,32,80,114,101,118,105,101,119,58],"value":"Tree View Menu Preview:"},
{"hash":108342734,"name":"tfrmoptionstreeviewmenucolor.treeviewmenusample.hint","sourcebytes":[67,104,97,110,103,101,32,99,111,108,111,114,32,111,110,32,108,101,102,116,32,97,110,100,32,121,111,117,39,108,108,32,115,101,101,32,104,101,114,101,32,97,32,112,114,101,118,105,101,119,32,111,102,32,119,104,97,116,32,121,111,117,114,32,84,114,101,101,32,86,105,101,119,32,77,101,110,117,115,32,119,105,108,108,32,108,111,111,107,32,108,105,107,101,115,32,119,105,116,104,32,116,104,105,115,32,115,97,109,112,108,101,46],"value":"Change color on left and you'll see here a preview of what your Tree View Menus will look likes with this sample."},
{"hash":317012,"name":"tfrmoptionstreeviewmenucolor.gbfont.caption","sourcebytes":[70,111,110,116],"value":"Font"},

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Configuration of Tree View Menu Color and Layout.
Copyright (C) 2016-2020 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2016-2023 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
@ -28,7 +28,7 @@ interface
uses
//Lazarus, Free-Pascal, etc.
SysUtils, Classes, Controls, Forms, StdCtrls, Buttons, ExtCtrls, Menus,
Dialogs, ComCtrls, ColorBox, Spin, LMessages,
Dialogs, ComCtrls, KASComboBox, Spin, LMessages,
//DC
uGlobs, fOptionsFrame, fTreeViewMenu, Types;
@ -44,46 +44,33 @@ type
gbLayoutAndColors: TGroupBox;
cbkUsageKeyboardShortcut: TCheckBox;
lblBackgroundColor: TLabel;
cbBackgroundColor: TColorBox;
btnBackgroundColor: TButton;
cbBackgroundColor: TKASColorBoxButton;
lblShortcutColor: TLabel;
cbShortcutColor: TColorBox;
btnShortcutColor: TButton;
cbShortcutColor: TKASColorBoxButton;
lblNormalTextColor: TLabel;
cbNormalTextColor: TColorBox;
btnNormalTextColor: TButton;
cbNormalTextColor: TKASColorBoxButton;
lblSecondaryTextColor: TLabel;
cbSecondaryTextColor: TColorBox;
btnSecondaryTextColor: TButton;
cbSecondaryTextColor: TKASColorBoxButton;
lblFoundTextColor: TLabel;
cbFoundTextColor: TColorBox;
btnFoundTextColor: TButton;
cbFoundTextColor: TKASColorBoxButton;
lblUnselectableTextColor: TLabel;
cbUnselectableTextColor: TColorBox;
btnUnselectableTextColor: TButton;
cbUnselectableTextColor: TKASColorBoxButton;
lblCursorColor: TLabel;
cbCursorColor: TColorBox;
btnCursorColor: TButton;
cbCursorColor: TKASColorBoxButton;
lblShortcutUnderCursor: TLabel;
cbShortcutUnderCursor: TColorBox;
btnShortcutUnderCursor: TButton;
cbShortcutUnderCursor: TKASColorBoxButton;
lblNormalTextUnderCursor: TLabel;
cbNormalTextUnderCursor: TColorBox;
btnNormalTextUnderCursor: TButton;
cbNormalTextUnderCursor: TKASColorBoxButton;
lblSecondaryTextUnderCursor: TLabel;
cbSecondaryTextUnderCursor: TColorBox;
btnSecondaryTextUnderCursor: TButton;
cbSecondaryTextUnderCursor: TKASColorBoxButton;
lblFoundTextUnderCursor: TLabel;
cbFoundTextUnderCursor: TColorBox;
btnFoundTextUnderCursor: TButton;
cbFoundTextUnderCursor: TKASColorBoxButton;
lblUnselectableUnderCursor: TLabel;
cbUnselectableUnderCursor: TColorBox;
btnUnselectableUnderCursor: TButton;
cbUnselectableUnderCursor: TKASColorBoxButton;
lblPreview: TLabel;
TreeViewMenuSample: TTreeView;
optColorDialog: TColorDialog;
procedure btFontClick(Sender: TObject);
procedure btnChooseColorClick(Sender: TObject);
procedure RefreshColorOfOurSampleClick(Sender: TObject);
procedure sedFontChange(Sender: TObject);
procedure TreeViewMenuSampleMouseWheelDown(Sender: TObject;
@ -99,7 +86,6 @@ type
{ Private declarations }
TreeViewMenuGenericRoutineAndVarHolder: TTreeViewMenuGenericRoutineAndVarHolder;
TempoFont: TDCFontOptions;
ColorBoxPointer: array[1..12] of TColorBox;
procedure ApplyTempoFontToVisual;
public
{ Public declarations }
@ -148,19 +134,6 @@ begin
cbBackgroundColor.Left := 10 + iLonguestName + 6 + 10;
cbBackgroundColor.BorderSpacing.Left:=10 + iLonguestName + 6 + 10;
ColorBoxPointer[1] := cbBackgroundColor;
ColorBoxPointer[2] := cbShortcutColor;
ColorBoxPointer[3] := cbNormalTextColor;
ColorBoxPointer[4] := cbSecondaryTextColor;
ColorBoxPointer[5] := cbFoundTextColor;
ColorBoxPointer[6] := cbUnselectableTextColor;
ColorBoxPointer[7] := cbCursorColor;
ColorBoxPointer[8] := cbShortcutUnderCursor;
ColorBoxPointer[9] := cbNormalTextUnderCursor;
ColorBoxPointer[10] := cbSecondaryTextUnderCursor;
ColorBoxPointer[11] := cbFoundTextUnderCursor;
ColorBoxPointer[12] := cbUnselectableUnderCursor;
TreeViewMenuGenericRoutineAndVarHolder := TTreeViewMenuGenericRoutineAndVarHolder.Create;
TreeViewMenuGenericRoutineAndVarHolder.SearchingText := rsStrPreviewSearchingLetters;
TreeViewMenuGenericRoutineAndVarHolder.CaseSensitive := False;
@ -208,18 +181,18 @@ begin
cbkUsageKeyboardShortcut.Checked := gTreeViewMenuUseKeyboardShortcut;
with gColors.TreeViewMenu^ do
begin
SetColorInColorBox(cbBackgroundColor, BackgroundColor);
SetColorInColorBox(cbShortcutColor, ShortcutColor);
SetColorInColorBox(cbNormalTextColor, NormalTextColor);
SetColorInColorBox(cbSecondaryTextColor, SecondaryTextColor);
SetColorInColorBox(cbFoundTextColor, FoundTextColor);
SetColorInColorBox(cbUnselectableTextColor, UnselectableTextColor);
SetColorInColorBox(cbCursorColor, CursorColor);
SetColorInColorBox(cbShortcutUnderCursor, ShortcutUnderCursor);
SetColorInColorBox(cbNormalTextUnderCursor, NormalTextUnderCursor);
SetColorInColorBox(cbSecondaryTextUnderCursor, SecondaryTextUnderCursor);
SetColorInColorBox(cbFoundTextUnderCursor, FoundTextUnderCursor);
SetColorInColorBox(cbUnselectableUnderCursor, UnselectableUnderCursor);
cbBackgroundColor.Selected := BackgroundColor;
cbShortcutColor.Selected := ShortcutColor;
cbNormalTextColor.Selected := NormalTextColor;
cbSecondaryTextColor.Selected := SecondaryTextColor;
cbFoundTextColor.Selected := FoundTextColor;
cbUnselectableTextColor.Selected := UnselectableTextColor;
cbCursorColor.Selected := CursorColor;
cbShortcutUnderCursor.Selected := ShortcutUnderCursor;
cbNormalTextUnderCursor.Selected := NormalTextUnderCursor;
cbSecondaryTextUnderCursor.Selected := SecondaryTextUnderCursor;
cbFoundTextUnderCursor.Selected := FoundTextUnderCursor;
cbUnselectableUnderCursor.Selected := UnselectableUnderCursor;
end;
TempoFont := gFonts[dcfTreeViewMenu];
ApplyTempoFontToVisual;
@ -292,20 +265,6 @@ begin
TreeViewMenuSample.Refresh;
end;
{ TfrmOptionsTreeViewMenuColor.btnChooseColorClick }
procedure TfrmOptionsTreeViewMenuColor.btnChooseColorClick(Sender: TObject);
begin
with Sender as TButton do
begin
optColorDialog.Color := ColorBoxPointer[tag].Selected;
if optColorDialog.Execute then
begin
SetColorInColorBox(ColorBoxPointer[tag], optColorDialog.Color);
RefreshColorOfOurSampleClick(ColorBoxPointer[tag]);
end;
end;
end;
{ TfrmOptionsTreeViewMenuColor.ApplyTempoFontToVisual }
procedure TfrmOptionsTreeViewMenuColor.ApplyTempoFontToVisual;
begin