diff --git a/ide/frames/options_oi.lfm b/ide/frames/options_oi.lfm index dbfdb21e43..abbfced11c 100644 --- a/ide/frames/options_oi.lfm +++ b/ide/frames/options_oi.lfm @@ -4,8 +4,8 @@ inherited OIOptionsFrame: TOIOptionsFrame ClientHeight = 395 ClientWidth = 598 Visible = False - DesignLeft = 66 - DesignTop = 87 + DesignLeft = 176 + DesignTop = 232 object ObjectInspectorColorsGroupBox: TGroupBox[0] AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner diff --git a/ide/frames/options_oi.lrs b/ide/frames/options_oi.lrs index 7171fc8c8e..0290e303e6 100644 --- a/ide/frames/options_oi.lrs +++ b/ide/frames/options_oi.lrs @@ -3,73 +3,73 @@ LazarusResources.Add('TOIOptionsFrame','FORMDATA',[ 'TPF0'#241#15'TOIOptionsFrame'#14'OIOptionsFrame'#6'Height'#3#139#1#5'Width'#3 +'V'#2#12'ClientHeight'#3#139#1#11'ClientWidth'#3'V'#2#7'Visible'#8#10'Design' - +'Left'#2'B'#9'DesignTop'#2'W'#0#242#2#0#9'TGroupBox'#29'ObjectInspectorColor' - +'sGroupBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 - +#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9 - +'asrBottom'#6'Height'#3#186#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'akLef' - +'t'#7'akRight'#0#8'AutoSize'#9#7'Caption'#6#29'ObjectInspectorColorsGroupBox' - +#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29 - +'ChildSizing.HorizontalSpacing'#2#2#27'ChildSizing.VerticalSpacing'#2#2#12'C' - +'lientHeight'#3#168#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#0#0#13'TColorList' - +'Box'#13'ColorsListBox'#22'AnchorSideLeft.Control'#7#29'ObjectInspectorColor' - +'sGroupBox'#21'AnchorSideTop.Control'#7#29'ObjectInspectorColorsGroupBox'#4 - +'Left'#2#6#6'Height'#3#128#0#3'Top'#2#6#5'Width'#3#210#0#5'Style'#11#14'cbCu' - +'stomColors'#0#11'OnGetColors'#7#22'ColorsListBoxGetColors'#20'BorderSpacing' - +'.Around'#2#6#17'OnSelectionChange'#7#28'ColorsListBoxSelectionChange'#8'Tab' - +'Order'#2#0#0#0#9'TColorBox'#8'ColorBox'#22'AnchorSideLeft.Control'#7#29'Obj' - +'ectInspectorColorsGroupBox'#21'AnchorSideTop.Control'#7#13'ColorsListBox'#18 - +'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#13'ColorsL' - +'istBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3 - +'Top'#3#140#0#5'Width'#3#210#0#5'Style'#11#16'cbStandardColors'#16'cbExtende' - +'dColors'#14'cbSystemColors'#13'cbCustomColor'#13'cbPrettyNames'#0#20'Border' - +'Spacing.Around'#2#6#10'ItemHeight'#2#16#8'OnChange'#7#14'ColorBoxChange'#8 - +'TabOrder'#2#1#0#0#7'TButton'#26'BtnUseDefaultLazarusColors'#22'AnchorSideLe' - +'ft.Control'#7#13'ColorsListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A' - +'nchorSideTop.Control'#7#13'ColorsListBox'#4'Left'#3#222#0#6'Height'#2#25#3 - +'Top'#2#6#5'Width'#3#162#0#8'AutoSize'#9#7'Caption'#6#26'BtnUseDefaultLazaru' - +'sColors'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#7'OnC' - +'lick'#7#31'BtnUseDefaultLazarusColorsClick'#8'TabOrder'#2#2#0#0#7'TButton' - +#25'BtnUseDefaultDelphiColors'#22'AnchorSideLeft.Control'#7#13'ColorsListBox' - +#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#26'BtnUs' - +'eDefaultLazarusColors'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideR' - +'ight.Control'#7#26'BtnUseDefaultLazarusColors'#20'AnchorSideRight.Side'#7#9 - +'asrBottom'#4'Left'#3#222#0#6'Height'#2#25#3'Top'#2'%'#5'Width'#3#162#0#7'An' - +'chors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.To' - +'p'#2#6#7'Caption'#6#25'BtnUseDefaultDelphiColors'#21'Constraints.MinHeight' - +#2#25#20'Constraints.MinWidth'#2'K'#7'OnClick'#7#30'BtnUseDefaultDelphiColor' - +'sClick'#8'TabOrder'#2#3#0#0#0#242#2#1#9'TGroupBox'#14'OIMiscGroupBox'#22'An' - +'chorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#29'ObjectInspe' - +'ctorColorsGroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' - +'t.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#3 - +#184#0#3'Top'#3#193#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR' - +'ight'#0#17'BorderSpacing.Top'#2#7#7'Caption'#6#14'OIMiscGroupBox'#12'Client' - +'Height'#3#166#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#1#0#6'TLabel'#24'OIDef' - +'aultItemHeightLabel'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'Anc' - +'horSideTop.Control'#7#23'OIDrawGridLinesCheckBox'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'j'#5'Width'#3#18#2#7'Anchors' - +#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpac' - +'ing.Top'#2#6#7'Caption'#6#24'OIDefaultItemHeightLabel'#11'ParentColor'#8#0#0 - +#9'TCheckBox'#18'OIShowHintCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscG' - +'roupBox'#21'AnchorSideTop.Control'#7#14'OIMiscGroupBox'#4'Left'#2#6#6'Heigh' - +'t'#2#19#3'Top'#2#6#5'Width'#3#130#0#18'BorderSpacing.Left'#2#6#17'BorderSpa' - +'cing.Top'#2#6#7'Caption'#6#18'OIShowHintCheckBox'#8'TabOrder'#2#0#0#0#9'TSp' - +'inEdit'#27'OIDefaultItemHeightSpinEdit'#22'AnchorSideLeft.Control'#7#14'OIM' - +'iscGroupBox'#21'AnchorSideTop.Control'#7#24'OIDefaultItemHeightLabel'#18'An' - +'chorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25#3'Top'#2'~'#5'W' - +'idth'#2'E'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8'TabOrder' - +#2#1#5'Value'#2#1#0#0#9'TCheckBox'#18'OIAutoShowCheckBox'#22'AnchorSideLeft.' - +'Control'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#18'OIShowHintChec' - +'kBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'To' - +'p'#2#31#5'Width'#3#134#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2 - +#6#7'Caption'#6#18'OIAutoShowCheckBox'#8'TabOrder'#2#2#0#0#9'TCheckBox'#24'O' - +'IBoldNonDefaultCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21 - +'AnchorSideTop.Control'#7#18'OIAutoShowCheckBox'#18'AnchorSideTop.Side'#7#9 - +'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'8'#5'Width'#3#159#0#18'Borde' - ,'rSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#24'OIBoldNonDefau' - +'ltCheckBox'#8'TabOrder'#2#3#0#0#9'TCheckBox'#23'OIDrawGridLinesCheckBox'#22 - +'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#24 - +'OIBoldNonDefaultCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6 - +#6'Height'#2#19#3'Top'#2'Q'#5'Width'#3#153#0#18'BorderSpacing.Left'#2#6#17'B' - +'orderSpacing.Top'#2#6#7'Caption'#6#23'OIDrawGridLinesCheckBox'#8'TabOrder'#2 - +#4#0#0#0#0 + +'Left'#3#176#0#9'DesignTop'#3#232#0#0#242#2#0#9'TGroupBox'#29'ObjectInspecto' + +'rColorsGroupBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Con' + +'trol'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.' + +'Side'#7#9'asrBottom'#6'Height'#3#186#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTo' + +'p'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#7'Caption'#6#29'ObjectInspectorColo' + +'rsGroupBox'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSp' + +'acing'#2#6#29'ChildSizing.HorizontalSpacing'#2#2#27'ChildSizing.VerticalSpa' + +'cing'#2#2#12'ClientHeight'#3#168#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#0#0 + +#13'TColorListBox'#13'ColorsListBox'#22'AnchorSideLeft.Control'#7#29'ObjectI' + +'nspectorColorsGroupBox'#21'AnchorSideTop.Control'#7#29'ObjectInspectorColor' + +'sGroupBox'#4'Left'#2#6#6'Height'#3#128#0#3'Top'#2#6#5'Width'#3#210#0#5'Styl' + +'e'#11#14'cbCustomColors'#0#11'OnGetColors'#7#22'ColorsListBoxGetColors'#20 + +'BorderSpacing.Around'#2#6#17'OnSelectionChange'#7#28'ColorsListBoxSelection' + +'Change'#8'TabOrder'#2#0#0#0#9'TColorBox'#8'ColorBox'#22'AnchorSideLeft.Cont' + +'rol'#7#29'ObjectInspectorColorsGroupBox'#21'AnchorSideTop.Control'#7#13'Col' + +'orsListBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contro' + +'l'#7#13'ColorsListBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6 + +'Height'#2#22#3'Top'#3#140#0#5'Width'#3#210#0#5'Style'#11#16'cbStandardColor' + +'s'#16'cbExtendedColors'#14'cbSystemColors'#13'cbCustomColor'#13'cbPrettyNam' + +'es'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#16#8'OnChange'#7#14'Col' + +'orBoxChange'#8'TabOrder'#2#1#0#0#7'TButton'#26'BtnUseDefaultLazarusColors' + +#22'AnchorSideLeft.Control'#7#13'ColorsListBox'#19'AnchorSideLeft.Side'#7#9 + +'asrBottom'#21'AnchorSideTop.Control'#7#13'ColorsListBox'#4'Left'#3#222#0#6 + +'Height'#2#25#3'Top'#2#6#5'Width'#3#162#0#8'AutoSize'#9#7'Caption'#6#26'BtnU' + +'seDefaultLazarusColors'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWi' + +'dth'#2'K'#7'OnClick'#7#31'BtnUseDefaultLazarusColorsClick'#8'TabOrder'#2#2#0 + +#0#7'TButton'#25'BtnUseDefaultDelphiColors'#22'AnchorSideLeft.Control'#7#13 + +'ColorsListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Cont' + +'rol'#7#26'BtnUseDefaultLazarusColors'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#23'AnchorSideRight.Control'#7#26'BtnUseDefaultLazarusColors'#20'AnchorSideR' + +'ight.Side'#7#9'asrBottom'#4'Left'#3#222#0#6'Height'#2#25#3'Top'#2'%'#5'Widt' + +'h'#3#162#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'B' + +'orderSpacing.Top'#2#6#7'Caption'#6#25'BtnUseDefaultDelphiColors'#21'Constra' + +'ints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#7'OnClick'#7#30'BtnUseDe' + +'faultDelphiColorsClick'#8'TabOrder'#2#3#0#0#0#242#2#1#9'TGroupBox'#14'OIMis' + +'cGroupBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 + +#29'ObjectInspectorColorsGroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23 + +'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom' + +#6'Height'#3#184#0#3'Top'#3#193#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'a' + +'kLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#7#7'Caption'#6#14'OIMiscGroupBo' + +'x'#12'ClientHeight'#3#166#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#1#0#6'TLab' + +'el'#24'OIDefaultItemHeightLabel'#22'AnchorSideLeft.Control'#7#14'OIMiscGrou' + +'pBox'#21'AnchorSideTop.Control'#7#23'OIDrawGridLinesCheckBox'#18'AnchorSide' + +'Top.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'j'#5'Width'#3 + +#18#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2 + +#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#24'OIDefaultItemHeightLabel'#11'Pa' + +'rentColor'#8#0#0#9'TCheckBox'#18'OIShowHintCheckBox'#22'AnchorSideLeft.Cont' + +'rol'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#14'OIMiscGroupBox'#4 + +'Left'#2#6#6'Height'#2#19#3'Top'#2#6#5'Width'#3#130#0#18'BorderSpacing.Left' + +#2#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#18'OIShowHintCheckBox'#8'TabOrde' + +'r'#2#0#0#0#9'TSpinEdit'#27'OIDefaultItemHeightSpinEdit'#22'AnchorSideLeft.C' + +'ontrol'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#24'OIDefaultItemHe' + +'ightLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25 + +#3'Top'#2'~'#5'Width'#2'E'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2 + +#6#8'TabOrder'#2#1#5'Value'#2#1#0#0#9'TCheckBox'#18'OIAutoShowCheckBox'#22'A' + +'nchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#18 + +'OIShowHintCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Hei' + +'ght'#2#19#3'Top'#2#31#5'Width'#3#134#0#18'BorderSpacing.Left'#2#6#17'Border' + +'Spacing.Top'#2#6#7'Caption'#6#18'OIAutoShowCheckBox'#8'TabOrder'#2#2#0#0#9 + +'TCheckBox'#24'OIBoldNonDefaultCheckBox'#22'AnchorSideLeft.Control'#7#14'OIM' + +'iscGroupBox'#21'AnchorSideTop.Control'#7#18'OIAutoShowCheckBox'#18'AnchorSi' + +'deTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'8'#5'Width'#3 + ,#159#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#24 + +'OIBoldNonDefaultCheckBox'#8'TabOrder'#2#3#0#0#9'TCheckBox'#23'OIDrawGridLin' + +'esCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'AnchorSideTo' + +'p.Control'#7#24'OIBoldNonDefaultCheckBox'#18'AnchorSideTop.Side'#7#9'asrBot' + +'tom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'Q'#5'Width'#3#153#0#18'BorderSpaci' + +'ng.Left'#2#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#23'OIDrawGridLinesCheck' + +'Box'#8'TabOrder'#2#4#0#0#0#0 ]); diff --git a/ide/frames/options_oi.pas b/ide/frames/options_oi.pas index cbbd2489f9..6c4497ac98 100644 --- a/ide/frames/options_oi.pas +++ b/ide/frames/options_oi.pas @@ -86,7 +86,7 @@ begin OIBoldNonDefaultCheckBox.Caption := lisBoldNonDefaultObjectInspector; OIDrawGridLinesCheckBox.Caption := lisDrawGridLinesObjectInspector; - SetLength(FStoredColors, 8); + SetLength(FStoredColors, 10); FStoredColors[0].ColorName := dlgBackColor; FStoredColors[1].ColorName := dlgSubPropColor; FStoredColors[2].ColorName := dlgReferenceColor; @@ -95,6 +95,8 @@ begin FStoredColors[5].ColorName := dlgValueColor; FStoredColors[6].ColorName := dlgDefValueColor; FStoredColors[7].ColorName := dlgPropNameColor; + FStoredColors[8].ColorName := dlgPropGutterColor; + FStoredColors[9].ColorName := dlgPropGutterEdgeColor; BtnUseDefaultLazarusColors.Caption := dlgOIUseDefaultLazarusColors; BtnUseDefaultDelphiColors.Caption := dlgOIUseDefaultDelphiColors; @@ -136,6 +138,8 @@ begin ChangeColor(5, DefValueColor); ChangeColor(6, DefDefaultValueColor); ChangeColor(7, DefNameColor); + ChangeColor(8, DefGutterColor); + ChangeColor(9, DefGutterEdgeColor); ColorsListBox.Invalidate; end; @@ -149,6 +153,8 @@ begin ChangeColor(5, clNavy); ChangeColor(6, clNavy); ChangeColor(7, clBtnText); + ChangeColor(8, clCream); + ChangeColor(9, clGray); ColorsListBox.Invalidate; end; @@ -177,6 +183,8 @@ begin FStoredColors[5].ColorValue := ObjectInspectorOptions.ValueColor; FStoredColors[6].ColorValue := ObjectInspectorOptions.DefaultValueColor; FStoredColors[7].ColorValue := ObjectInspectorOptions.PropertyNameColor; + FStoredColors[8].ColorValue := ObjectInspectorOptions.GutterColor; + FStoredColors[9].ColorValue := ObjectInspectorOptions.GutterEdgeColor; OIDefaultItemHeightSpinEdit.Value:=ObjectInspectorOptions.DefaultItemHeight; OIShowHintCheckBox.Checked := ObjectInspectorOptions.ShowHints; @@ -200,6 +208,8 @@ begin ObjectInspectorOptions.ValueColor := ColorsListBox.Colors[5]; ObjectInspectorOptions.DefaultValueColor := ColorsListBox.Colors[6]; ObjectInspectorOptions.PropertyNameColor := ColorsListBox.Colors[7]; + ObjectInspectorOptions.GutterColor := ColorsListBox.Colors[8]; + ObjectInspectorOptions.GutterEdgeColor := ColorsListBox.Colors[9]; ObjectInspectorOptions.DefaultItemHeight:= RoundToInt(OIDefaultItemHeightSpinEdit.Value); diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 7dddb11bfc..e0284a15f2 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -1030,6 +1030,8 @@ resourcestring liswlDeLeteAll = 'De&lete All'; dlgDefValueColor = 'Default value'; dlgPropNameColor = 'Property name'; + dlgPropGutterColor = 'Gutter'; + dlgPropGutterEdgeColor = 'Gutter Edge'; dlgOIMiscellaneous = 'Miscellaneous'; dlgOIItemHeight = 'Item height'; diff --git a/ideintf/objectinspector.pp b/ideintf/objectinspector.pp index 176dcc3703..fd2365de38 100644 --- a/ideintf/objectinspector.pp +++ b/ideintf/objectinspector.pp @@ -53,6 +53,8 @@ const DefValueColor = clMaroon; DefHighlightColor = clHighlight; DefHighlightFontColor = clHighlightText; + DefGutterColor = DefBackgroundColor; + DefGutterEdgeColor = cl3DShadow; type EObjectInspectorException = class(Exception); @@ -164,6 +166,8 @@ type FComponentTreeHeight: integer; FConfigStore: TConfigStorage; FDefaultItemHeight: integer; + FGutterColor: TColor; + FGutterEdgeColor: TColor; FShowComponentTree: boolean; FSaveBounds: boolean; @@ -220,6 +224,8 @@ type property PropertyNameColor: TColor read FPropertyNameColor write FPropertyNameColor; property HighlightColor: TColor read FHighlightColor write FHighlightColor; property HighlightFontColor: TColor read FHighlightFontColor write FHighlightFontColor; + property GutterColor: TColor read FGutterColor write FGutterColor; + property GutterEdgeColor: TColor read FGutterEdgeColor write FGutterEdgeColor; property ShowHints: boolean read FShowHints write FShowHints; @@ -315,6 +321,8 @@ type private FBackgroundColor: TColor; FColumn: TOICustomPropertyGridColumn; + FGutterColor: TColor; + FGutterEdgeColor: TColor; FHighlightColor: TColor; FLayout: TOILayout; FOnOIKeyDown: TKeyEvent; @@ -365,6 +373,8 @@ type procedure SetDrawHorzGridLines(const AValue: Boolean); procedure SetFavourites(const AValue: TOIFavouriteProperties); procedure SetFilter(const AValue: TTypeKinds); + procedure SetGutterColor(const AValue: TColor); + procedure SetGutterEdgeColor(const AValue: TColor); procedure SetHighlightColor(const AValue: TColor); procedure SetItemIndex(NewIndex:integer); @@ -488,6 +498,8 @@ type public property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor default DefBackgroundColor; + property GutterColor: TColor read FGutterColor write SetGutterColor default DefGutterColor; + property GutterEdgeColor: TColor read FGutterEdgeColor write SetGutterEdgeColor default DefGutterEdgeColor; property HighlightColor: TColor read FHighlightColor write SetHighlightColor default DefHighlightColor; property ReferencesColor: TColor read FReferencesColor write SetReferences default DefReferencesColor; @@ -838,6 +850,8 @@ begin FReferencesColor:=DefReferencesColor; FSubPropertiesColor:=DefSubPropertiesColor; FHighlightColor:=DefHighlightColor; + FGutterColor:=DefGutterColor; + FGutterEdgeColor:=DefGutterEdgeColor; FNameFont:=TFont.Create; FNameFont.Color:=DefNameColor; @@ -2402,7 +2416,10 @@ begin if Layout = oilVertical then ValueRect.Left := NameTextRect.Left else + begin + inc(NameIconRect.Right, 3); inc(NameTextRect.Left, 4); + end; DrawState:=[]; if ARow = FItemIndex then @@ -2423,6 +2440,12 @@ begin FillRect(FullRect); end; + if (FGutterColor <> FBackgroundColor) and (FGutterColor <> clNone) then + begin + Brush.Color := FGutterColor; + FillRect(NameIconRect); + end; + // draw icon if CanExpandRow(CurRow) then DrawTreeIcon(IconX, IconY, CurRow.Expanded); @@ -2501,38 +2524,39 @@ begin Pen.Style := psSolid; Pen.Cosmetic := True; Pen.Color := cl3DHiLight; - MoveTo(NameTextRect.Left - 1, NameRect.Bottom - 1); - LineTo(NameTextRect.Left - 1, NameRect.Top - 1 - FRowSpacing); MoveTo(NameRect.Right - 1, NameRect.Bottom - 1); LineTo(NameRect.Right - 1, NameRect.Top - 1 - FRowSpacing); Pen.Color := cl3DShadow; - MoveTo(NameTextRect.Left - 2, NameRect.Bottom - 1); - LineTo(NameTextRect.Left - 2, NameRect.Top - 1 - FRowSpacing); MoveTo(NameRect.Right - 2, NameRect.Bottom - 1); LineTo(NameRect.Right - 2, NameRect.Top - 1 - FRowSpacing); + // draw gutter line + Pen.Color := GutterEdgeColor; + MoveTo(NameIconRect.Right, NameRect.Bottom - 1); + LineTo(NameIconRect.Right, NameRect.Top - 1 - FRowSpacing); + if CurRow.Lvl > 0 then begin // draw to parent if ARow > 0 then begin ParentRect := RowRect(ARow - 1); - X := ParentRect.Left + GetTreeIconX(ARow - 1) + Indent + 2; - if X <> NameTextRect.Left - 2 then + X := ParentRect.Left + GetTreeIconX(ARow - 1) + Indent + 3; + if X <> NameIconRect.Right then begin - MoveTo(NameTextRect.Left - 2, NameRect.Top - 1 - FRowSpacing); - LineTo(X, NameRect.Top - 1 - FRowSpacing); + MoveTo(NameIconRect.Right, NameRect.Top - 1 - FRowSpacing); + LineTo(X - 1, NameRect.Top - 1 - FRowSpacing); end; end; // to to parent next sibling if ARow < FRows.Count - 1 then begin ParentRect := RowRect(ARow + 1); - X := ParentRect.Left + GetTreeIconX(ARow + 1) + Indent + 2; - if X <> NameTextRect.Left - 2 then + X := ParentRect.Left + GetTreeIconX(ARow + 1) + Indent + 3; + if X <> NameIconRect.Right then begin - MoveTo(NameTextRect.Left - 2, NameRect.Bottom - 1); - LineTo(X, NameRect.Bottom - 1); + MoveTo(NameIconRect.Right, NameRect.Bottom - 1); + LineTo(X - 1, NameRect.Bottom - 1); end; end; end; @@ -2724,6 +2748,20 @@ begin end; end; +procedure TOICustomPropertyGrid.SetGutterColor(const AValue: TColor); +begin + if FGutterColor=AValue then exit; + FGutterColor:=AValue; + invalidate; +end; + +procedure TOICustomPropertyGrid.SetGutterEdgeColor(const AValue: TColor); +begin + if FGutterEdgeColor=AValue then exit; + FGutterEdgeColor:=AValue; + invalidate; +end; + procedure TOICustomPropertyGrid.SetHighlightColor(const AValue: TColor); begin if FHighlightColor=AValue then exit; @@ -3301,6 +3339,8 @@ begin FPropertyNameColor := DefNameColor; FHighlightColor := DefHighlightColor; FHighlightFontColor := DefHighlightFontColor; + FGutterColor := DefGutterColor; + FGutterEdgeColor := DefGutterEdgeColor; FBoldNonDefaultValues := True; FDrawGridLines := True; @@ -3364,6 +3404,10 @@ begin Path+'Color/Highlight',DefHighlightColor); FHighlightFontColor:=ConfigStore.GetValue( Path+'Color/HighlightFont',DefHighlightFontColor); + FGutterColor:=ConfigStore.GetValue( + Path+'Color/Gutter',DefGutterColor); + FGutterEdgeColor:=ConfigStore.GetValue( + Path+'Color/GutterEdge',DefGutterEdgeColor); FShowHints:=ConfigStore.GetValue( Path+'ShowHints',FileVersion>=3); @@ -3431,6 +3475,10 @@ begin FHighlightColor,DefHighlightColor); ConfigStore.SetDeleteValue(Path+'Color/HighlightFont', FHighlightFontColor,DefHighlightFontColor); + ConfigStore.SetDeleteValue(Path+'Color/Gutter', + FGutterColor,DefGutterColor); + ConfigStore.SetDeleteValue(Path+'Color/GutterEdge', + FGutterEdgeColor,DefGutterEdgeColor); ConfigStore.SetDeleteValue(Path+'ShowHints',FShowHints, true); @@ -3469,6 +3517,8 @@ begin FPropertyNameColor:=AnObjInspector.PropertyGrid.NameFont.Color; FHighlightColor:=AnObjInspector.PropertyGrid.HighlightColor; FHighlightFontColor:=AnObjInspector.PropertyGrid.HighlightFont.Color; + FGutterColor:=AnObjInspector.PropertyGrid.GutterColor; + FGutterEdgeColor:=AnObjInspector.PropertyGrid.GutterEdgeColor; FShowHints := AnObjInspector.PropertyGrid.ShowHint; FAutoShow := AnObjInspector.AutoShow; @@ -3505,6 +3555,8 @@ begin Grid.NameFont.Color := FPropertyNameColor; Grid.HighlightColor := FHighlightColor; Grid.HighlightFont.Color := FHighlightFontColor; + Grid.GutterColor := FGutterColor; + Grid.GutterEdgeColor := FGutterEdgeColor; Grid.ShowHint := FShowHints; Grid.DrawHorzGridLines := FDrawGridLines; end;