Object Inspector: Differentiate multi-selected properties which have different values using background color. Issue #23151.

git-svn-id: trunk@52075 -
This commit is contained in:
juha 2016-03-28 10:37:25 +00:00
parent 350461f95e
commit 9aab2a374d
5 changed files with 187 additions and 132 deletions

View File

@ -47,8 +47,9 @@ const
DefReferencesColor = clMaroon;
DefSubPropertiesColor = clGreen;
DefNameColor = clWindowText;
DefDefaultValueColor = clWindowText;
DefValueColor = clMaroon;
DefDefaultValueColor = clWindowText;
DefValueDifferBackgrndColor = $F0F0FF; // Sort of pink.
DefReadOnlyColor = clGrayText;
DefHighlightColor = clHighlight;
DefHighlightFontColor = clHighlightText;
@ -94,9 +95,10 @@ type
FGridSplitterX: array[TObjectInspectorPage] of integer;
FPropertyNameColor: TColor;
FDefaultValueColor: TColor;
FSubPropertiesColor: TColor;
FValueColor: TColor;
FDefaultValueColor: TColor;
FValueDifferBackgrndColor: TColor;
FReadOnlyColor: TColor;
FReferencesColor: TColor;
FGridBackgroundColor: TColor;
@ -138,9 +140,10 @@ type
property GridBackgroundColor: TColor read FGridBackgroundColor write FGridBackgroundColor;
property SubPropertiesColor: TColor read FSubPropertiesColor write FSubPropertiesColor;
property ReferencesColor: TColor read FReferencesColor write FReferencesColor;
property ValueColor: TColor read FValueColor write FValueColor;
property ReadOnlyColor: TColor read FReadOnlyColor write FReadOnlyColor;
property ValueColor: TColor read FValueColor write FValueColor;
property DefaultValueColor: TColor read FDefaultValueColor write FDefaultValueColor;
property ValueDifferBackgrndColor: TColor read FValueDifferBackgrndColor write FValueDifferBackgrndColor;
property PropertyNameColor: TColor read FPropertyNameColor write FPropertyNameColor;
property HighlightColor: TColor read FHighlightColor write FHighlightColor;
property HighlightFontColor: TColor read FHighlightFontColor write FHighlightFontColor;
@ -281,6 +284,7 @@ type
FIndent: integer;
FItemIndex: integer;
FNameFont, FDefaultValueFont, FValueFont, FHighlightFont: TFont;
FValueDifferBackgrndColor: TColor;
FNewComboBoxItems: TStringList;
FOnModified: TNotifyEvent;
FRows: TFPList;// list of TOIPropertyGridRow
@ -409,6 +413,7 @@ type
procedure SetReferences(const AValue: TColor);
procedure SetSubPropertiesColor(const AValue: TColor);
procedure SetReadOnlyColor(const AValue: TColor);
procedure SetValueDifferBackgrndColor(AValue: TColor);
procedure UpdateScrollBar;
function FillComboboxItems: boolean; // true if something changed
function EditorFilter(const AEditor: TPropertyEditor): Boolean;
@ -472,6 +477,9 @@ type
write SetSubPropertiesColor default DefSubPropertiesColor;
property ReadOnlyColor: TColor read FReadOnlyColor
write SetReadOnlyColor default DefReadOnlyColor;
property ValueDifferBackgrndColor: TColor read FValueDifferBackgrndColor
write SetValueDifferBackgrndColor default DefValueDifferBackgrndColor;
property NameFont: TFont read FNameFont write FNameFont;
property DefaultValueFont: TFont read FDefaultValueFont write FDefaultValueFont;
property ValueFont: TFont read FValueFont write FValueFont;
@ -1766,6 +1774,13 @@ begin
begin
if FPropertyEditorHook<>nil then
FCurrentEditorLookupRoot:=FPropertyEditorHook.LookupRoot;
if (FCurrentEdit=ValueComboBox) or (FCurrentEdit=ValueEdit) then
begin
if NewRow.Editor.AllEqual then
FCurrentEdit.Color:=clWindow
else
FCurrentEdit.Color:=FValueDifferBackgrndColor;
end;
FCurrentEdit.Visible:=true;
if (FDragging=false) and (FCurrentEdit.Showing)
and FCurrentEdit.Enabled
@ -2715,6 +2730,7 @@ var
NameBgColor: TColor;
Details: TThemedElementDetails;
Size: TSize;
DrawValuesDiffer: Boolean;
begin
CurRow := Rows[ARow];
FullRect := RowRect(ARow);
@ -2753,16 +2769,20 @@ begin
with Canvas do
begin
// clear background in one go
if (ARow = FItemIndex) and (FHighlightColor <> clNone) then
NameBgColor := FHighlightColor
else
NameBgColor := FBackgroundColor;
DrawValuesDiffer := (FValueDifferBackgrndColor<>clNone) and not CurRow.Editor.AllEqual;
if FBackgroundColor <> clNone then
begin
Brush.Color := FBackgroundColor;
FillRect(FullRect);
if DrawValuesDiffer then
FillRect(NameRect)
else
FillRect(FullRect);
end;
if DrawValuesDiffer then
begin
// Make the background color darker than what the active edit control has.
Brush.Color := FValueDifferBackgrndColor - $282828;
FillRect(ValueRect);
end;
if ShowGutter and (Layout = oilHorizontal) and
@ -2784,6 +2804,10 @@ begin
Canvas.Draw(IconX, IconY, FActiveRowBmp);
// draw name
if (ARow = FItemIndex) and (FHighlightColor <> clNone) then
NameBgColor := FHighlightColor
else
NameBgColor := FBackgroundColor;
OldFont:=Font;
Font:=FNameFont;
Font.Color := GetPropNameColor(CurRow);
@ -3415,6 +3439,13 @@ begin
Invalidate;
end;
procedure TOICustomPropertyGrid.SetValueDifferBackgrndColor(AValue: TColor);
begin
if FValueDifferBackgrndColor=AValue then Exit;
FValueDifferBackgrndColor:=AValue;
Invalidate;
end;
//------------------------------------------------------------------------------
{ TOIPropertyGridRow }
@ -3692,9 +3723,10 @@ begin
FInfoBoxHeight:=80;
FGridBackgroundColor := DefBackgroundColor;
FDefaultValueColor := DefDefaultValueColor;
FSubPropertiesColor := DefSubPropertiesColor;
FValueColor := DefValueColor;
FDefaultValueColor := DefDefaultValueColor;
FValueDifferBackgrndColor := DefValueDifferBackgrndColor;
FReadOnlyColor := DefReadOnlyColor;
FReferencesColor := DefReferencesColor;
FPropertyNameColor := DefNameColor;
@ -3747,9 +3779,10 @@ begin
FComponentTreeHeight:=ConfigStore.GetValue(Path+'ComponentTree/Height/Value',160);
FGridBackgroundColor:=ConfigStore.GetValue(Path+'Color/GridBackground',DefBackgroundColor);
FDefaultValueColor:=ConfigStore.GetValue(Path+'Color/DefaultValue',DefDefaultValueColor);
FSubPropertiesColor:=ConfigStore.GetValue(Path+'Color/SubProperties',DefSubPropertiesColor);
FValueColor:=ConfigStore.GetValue(Path+'Color/Value',DefValueColor);
FDefaultValueColor:=ConfigStore.GetValue(Path+'Color/DefaultValue',DefDefaultValueColor);
FValueDifferBackgrndColor:=ConfigStore.GetValue(Path+'Color/ValueDifferBackgrnd',DefValueDifferBackgrndColor);
FReadOnlyColor:=ConfigStore.GetValue(Path+'Color/ReadOnly',DefReadOnlyColor);
FReferencesColor:=ConfigStore.GetValue(Path+'Color/References',DefReferencesColor);
FPropertyNameColor:=ConfigStore.GetValue(Path+'Color/PropertyName',DefNameColor);
@ -3801,9 +3834,10 @@ begin
ConfigStore.SetDeleteValue(Path+'ComponentTree/Height/Value',FComponentTreeHeight,160);
ConfigStore.SetDeleteValue(Path+'Color/GridBackground',FGridBackgroundColor,DefBackgroundColor);
ConfigStore.SetDeleteValue(Path+'Color/DefaultValue',FDefaultValueColor,DefDefaultValueColor);
ConfigStore.SetDeleteValue(Path+'Color/SubProperties',FSubPropertiesColor,DefSubPropertiesColor);
ConfigStore.SetDeleteValue(Path+'Color/Value',FValueColor,DefValueColor);
ConfigStore.SetDeleteValue(Path+'Color/DefaultValue',FDefaultValueColor,DefDefaultValueColor);
ConfigStore.SetDeleteValue(Path+'Color/ValueDifferBackgrnd',FValueDifferBackgrndColor,DefValueDifferBackgrndColor);
ConfigStore.SetDeleteValue(Path+'Color/ReadOnly',FReadOnlyColor,DefReadOnlyColor);
ConfigStore.SetDeleteValue(Path+'Color/References',FReferencesColor,DefReferencesColor);
ConfigStore.SetDeleteValue(Path+'Color/PropertyName',FPropertyNameColor,DefNameColor);
@ -3850,6 +3884,7 @@ begin
FReferencesColor:=AnObjInspector.PropertyGrid.ReferencesColor;
FValueColor:=AnObjInspector.PropertyGrid.ValueFont.Color;
FDefaultValueColor:=AnObjInspector.PropertyGrid.DefaultValueFont.Color;
FValueDifferBackgrndColor:=AnObjInspector.PropertyGrid.ValueDifferBackgrndColor;
FReadOnlyColor:=AnObjInspector.PropertyGrid.ReadOnlyColor;
FPropertyNameColor:=AnObjInspector.PropertyGrid.NameFont.Color;
FHighlightColor:=AnObjInspector.PropertyGrid.HighlightColor;
@ -3903,6 +3938,7 @@ begin
AGrid.SubPropertiesColor := FSubPropertiesColor;
AGrid.ReferencesColor := FReferencesColor;
AGrid.ReadOnlyColor := FReadOnlyColor;
AGrid.ValueDifferBackgrndColor := FValueDifferBackgrndColor;
AGrid.ValueFont.Color := FValueColor;
if FBoldNonDefaultValues then
AGrid.ValueFont.Style := [fsBold]

View File

@ -579,6 +579,7 @@ type
public
constructor Create(Hook: TPropertyEditorHook; APropCount: Integer); override;
function AllEqual: Boolean; override;
function GetAttributes: TPropertyAttributes; override;
procedure GetProperties(Proc: TGetPropEditProc); override;
function GetValue: ansistring; override;
@ -614,6 +615,9 @@ type
edited (e.g. the DataSource property). }
TPersistentPropertyEditor = class(TClassPropertyEditor)
private
// Used in AllEqual of TComponentOneFormPropertyEditor and TComponentPropertyEditor.
function ComponentsAllEqual: Boolean;
protected
function FilterFunc(const ATestEditor: TPropertyEditor): Boolean;
function GetPersistentReference: TPersistent; virtual;
@ -3485,7 +3489,7 @@ procedure TBoolPropertyEditor.PropDrawValue(ACanvas: TCanvas; const ARect: TRect
var
TxtRect: TRect;
{$IFnDEF UseOINormalCheckBox}
str: string;
VisVal: string;
stat: TCheckBoxState;
{$ENDIF}
begin
@ -3493,15 +3497,14 @@ begin
begin // Checkbox for Booleans.
{$IFnDEF UseOINormalCheckBox}
TxtRect.Top := -100; // Don't call inherited PropDrawValue
if GetOrdValue<>0 then
begin
stat := cbChecked;
str := '(True)';
end else begin
VisVal := GetVisualValue;
if (VisVal = '') or (VisVal = oisMixed) then
stat := cbGrayed
else if VisVal = '(True)' then
stat := cbChecked
else
stat := cbUnchecked;
str := '(False)';
end;
TCheckBoxThemed.PaintSelf(ACanvas, str, ARect, stat, False, False, False, False, taRightJustify);
TCheckBoxThemed.PaintSelf(ACanvas, VisVal, ARect, stat, False, False, False, False, taRightJustify);
{$ELSE}
TxtRect := DrawCheckbox(ACanvas, ARect, GetOrdValue<>0);
{$ENDIF}
@ -4210,6 +4213,11 @@ begin
FSubPropsTypeFilter := tkAny;
end;
function TClassPropertyEditor.AllEqual: Boolean;
begin
Result:=True; // ToDo: Maybe all sub-properties should be compared for equality.
end;
function TClassPropertyEditor.EditorFilter(
const AEditor: TPropertyEditor): Boolean;
begin
@ -4562,6 +4570,22 @@ begin
Result:=true;
end;
function TPersistentPropertyEditor.ComponentsAllEqual: Boolean;
// Called from AllEqual of TComponentOneFormPropertyEditor and TComponentPropertyEditor.
var
I: Integer;
AComponent: TComponent;
begin
Result:=False;
AComponent:=TComponent(GetObjectValue);
if PropCount > 1 then
for I := 1 to PropCount - 1 do
if TComponent(GetObjectValueAt(I)) <> AComponent then
Exit;
if AComponent=nil then Exit(True);
Result:=csDesigning in AComponent.ComponentState;
end;
function TPersistentPropertyEditor.AllEqual: Boolean;
var
I: Integer;
@ -4573,7 +4597,7 @@ begin
for I := 1 to PropCount - 1 do
if TPersistent(GetObjectValueAt(I)) <> LInstance then
Exit;
Result := LInstance<>nil;
Result := True;
end;
procedure TPersistentPropertyEditor.Edit;
@ -4662,14 +4686,8 @@ end;
{ TComponentOneFormPropertyEditor }
function TComponentOneFormPropertyEditor.AllEqual: Boolean;
var
AComponent: TComponent;
begin
Result:=false;
if not (inherited AllEqual) then exit;
AComponent:=TComponent(GetObjectValue);
if AComponent=nil then exit;
Result:=csDesigning in AComponent.ComponentState;
Result:=ComponentsAllEqual;
end;
procedure TComponentOneFormPropertyEditor.GetValues(Proc: TGetStrProc);
@ -4705,14 +4723,8 @@ begin
end;
function TComponentPropertyEditor.AllEqual: Boolean;
var
AComponent: TComponent;
begin
Result:=false;
if not (inherited AllEqual) then exit;
AComponent:=GetComponentReference;
if AComponent=nil then exit;
Result:=csDesigning in AComponent.ComponentState;
Result:=ComponentsAllEqual;
end;
{ TInterfacePropertyEditor }

View File

@ -2,9 +2,9 @@ object OIOptionsFrame: TOIOptionsFrame
Left = 0
Height = 484
Top = 0
Width = 634
Width = 678
ClientHeight = 484
ClientWidth = 634
ClientWidth = 678
TabOrder = 0
Visible = False
DesignLeft = 479
@ -12,20 +12,19 @@ object OIOptionsFrame: TOIOptionsFrame
object ObjectInspectorColorsGroupBox: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 230
Height = 236
Top = 0
Width = 230
Width = 294
AutoSize = True
Caption = 'ObjectInspectorColorsGroupBox'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.HorizontalSpacing = 2
ChildSizing.VerticalSpacing = 2
ClientHeight = 208
ClientWidth = 222
ClientHeight = 215
ClientWidth = 286
TabOrder = 0
object ColorsListBox: TColorListBox
AnchorSideLeft.Control = ObjectInspectorColorsGroupBox
@ -33,7 +32,7 @@ object OIOptionsFrame: TOIOptionsFrame
Left = 6
Height = 170
Top = 6
Width = 210
Width = 274
Style = [cbCustomColors]
OnGetColors = ColorsListBoxGetColors
BorderSpacing.Around = 6
@ -48,11 +47,12 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideRight.Control = ColorsListBox
AnchorSideRight.Side = asrBottom
Left = 6
Height = 20
Height = 27
Top = 182
Width = 210
Width = 274
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
BorderSpacing.Around = 6
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
ItemHeight = 16
OnChange = ColorBoxChange
TabOrder = 1
@ -65,23 +65,23 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 124
Top = 237
Width = 634
Height = 167
Top = 243
Width = 678
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 7
Caption = 'OIOptionsGroupBox'
ClientHeight = 136
ClientWidth = 630
ClientHeight = 146
ClientWidth = 670
TabOrder = 3
object OICheckboxForBooleanCheckBox: TCheckBox
AnchorSideLeft.Control = OIOptsCenterLabel
AnchorSideTop.Control = OIOptionsGroupBox
Left = 313
Height = 18
Left = 335
Height = 22
Top = 6
Width = 225
Width = 251
BorderSpacing.Top = 6
Caption = 'OICheckboxForBooleanCheckBox'
ParentShowHint = False
@ -92,9 +92,9 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIOptionsGroupBox
AnchorSideTop.Control = OIOptionsGroupBox
Left = 6
Height = 18
Height = 22
Top = 6
Width = 159
Width = 177
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'OIAutoShowCheckBox'
@ -106,10 +106,10 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIOptsCenterLabel
AnchorSideTop.Control = OICheckboxForBooleanCheckBox
AnchorSideTop.Side = asrBottom
Left = 313
Height = 18
Top = 30
Width = 194
Left = 335
Height = 22
Top = 34
Width = 215
BorderSpacing.Top = 6
Caption = 'OIBoldNonDefaultCheckBox'
ParentShowHint = False
@ -120,10 +120,10 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIOptsCenterLabel
AnchorSideTop.Control = OIShowGutterCheckBox
AnchorSideTop.Side = asrBottom
Left = 313
Height = 18
Top = 78
Width = 187
Left = 335
Height = 22
Top = 90
Width = 207
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = 'OIDrawGridLinesCheckBox'
@ -135,10 +135,10 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIOptsCenterLabel
AnchorSideTop.Control = OIBoldNonDefaultCheckBox
AnchorSideTop.Side = asrBottom
Left = 313
Height = 18
Top = 54
Width = 169
Left = 335
Height = 22
Top = 62
Width = 189
BorderSpacing.Top = 6
Caption = 'OIShowGutterCheckBox'
ParentShowHint = False
@ -150,9 +150,9 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideTop.Control = OIShowInfoBoxCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 18
Top = 78
Width = 187
Height = 22
Top = 90
Width = 211
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'OIShowStatusBarCheckBox'
@ -165,9 +165,9 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideTop.Control = OIShowComponentTreeCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 18
Top = 54
Width = 176
Height = 22
Top = 62
Width = 196
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'OIShowInfoBoxCheckBox'
@ -180,9 +180,9 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideTop.Control = OIAutoShowCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 18
Top = 30
Width = 230
Height = 22
Top = 34
Width = 251
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'OIShowComponentTreeCheckBox'
@ -194,7 +194,7 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIOptionsGroupBox
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = OIOptionsGroupBox
Left = 313
Left = 335
Height = 1
Top = 0
Width = 1
@ -205,9 +205,9 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideTop.Control = OIShowStatusBarCheckBox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 20
Top = 110
Width = 155
Height = 22
Top = 118
Width = 173
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
@ -224,26 +224,27 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = OIMiscGroupBox
Left = 237
Height = 173
Left = 297
Height = 166
Top = 0
Width = 397
Width = 381
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 7
BorderSpacing.Left = 3
BorderSpacing.Bottom = 7
Caption = 'ObjectInspectorSpeedSettingsGroupBox'
ClientHeight = 145
ClientWidth = 397
ClientWidth = 373
TabOrder = 1
object BtnUseDefaultLazarusSettings: TButton
AnchorSideLeft.Control = ObjectInspectorSpeedSettingsGroupBox
AnchorSideTop.Control = ObjectInspectorSpeedSettingsGroupBox
Left = 6
Height = 25
Left = 3
Height = 29
Top = 6
Width = 215
Width = 214
AutoSize = True
BorderSpacing.Around = 6
BorderSpacing.Left = 3
BorderSpacing.Top = 6
Caption = 'BtnUseDefaultLazarusSettings'
Constraints.MinHeight = 25
Constraints.MinWidth = 75
@ -256,13 +257,13 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BtnUseDefaultLazarusSettings
AnchorSideRight.Side = asrBottom
Left = 6
Height = 25
Top = 37
Width = 215
Left = 3
Height = 29
Top = 41
Width = 214
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Left = 3
BorderSpacing.Top = 6
Caption = 'BtnUseDefaultDelphiSettings'
Constraints.MinHeight = 25
@ -278,25 +279,24 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ObjectInspectorColorsGroupBox
AnchorSideBottom.Side = asrBottom
Left = 233
Height = 57
Top = 171
Width = 401
Left = 301
Height = 63
Top = 173
Width = 377
Anchors = [akLeft, akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 7
Caption = 'OIMiscGroupBox'
ClientHeight = 38
ClientWidth = 397
ClientHeight = 42
ClientWidth = 369
TabOrder = 2
object OIDefaultItemHeightLabel: TLabel
AnchorSideLeft.Control = OIMiscGroupBox
AnchorSideTop.Control = OIDefaultItemHeightSpinEdit
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 6
Width = 162
Height = 17
Top = 11
Width = 174
BorderSpacing.Around = 6
Caption = 'OIDefaultItemHeightLabel'
ParentColor = False
@ -305,8 +305,8 @@ object OIOptionsFrame: TOIOptionsFrame
AnchorSideLeft.Control = OIDefaultItemHeightLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = OIMiscGroupBox
Left = 174
Height = 16
Left = 186
Height = 27
Top = 6
Width = 53
BorderSpacing.Around = 6

View File

@ -42,6 +42,7 @@ type
ocPropName,
ocValue,
ocDefValue,
ocValueDifferBackgrnd,
ocSubProp,
ocReference,
ocReadOnly
@ -113,17 +114,18 @@ const
DefaultOISettings: TSpeedOISettings = (
Name: 'Default';
Colors: (
{ ocBackground } DefBackgroundColor,
{ ocGutter } DefGutterColor,
{ ocGutterEdge } DefGutterEdgeColor,
{ ocHighlight } DefHighlightColor,
{ ocHighlightFont } DefHighlightFontColor,
{ ocPropName } DefNameColor,
{ ocValue } DefValueColor,
{ ocDefValue } DefDefaultValueColor,
{ ocSubProp } DefSubPropertiesColor,
{ ocReference } DefReferencesColor,
{ ocReadOnly } DefReadOnlyColor
{ ocBackground } DefBackgroundColor,
{ ocGutter } DefGutterColor,
{ ocGutterEdge } DefGutterEdgeColor,
{ ocHighlight } DefHighlightColor,
{ ocHighlightFont } DefHighlightFontColor,
{ ocPropName } DefNameColor,
{ ocValue } DefValueColor,
{ ocDefValue } DefDefaultValueColor,
{ ocValueDifferBackgrnd} DefValueDifferBackgrndColor,
{ ocSubProp } DefSubPropertiesColor,
{ ocReference } DefReferencesColor,
{ ocReadOnly } DefReadOnlyColor
);
Options: (
{ ooShowComponentTree } True,
@ -141,17 +143,18 @@ const
DelphiOISettings: TSpeedOISettings = (
Name: 'Delphi';
Colors: (
{ ocBackground } clWindow,
{ ocGutter } clCream,
{ ocGutterEdge } clGray,
{ ocHighlight } $E0E0E0,
{ ocHighlightFont } clBlack,
{ ocPropName } clBtnText,
{ ocValue } clNavy,
{ ocDefValue } clNavy,
{ ocSubProp } clGreen,
{ ocReference } clMaroon,
{ ocReadOnly } clGrayText
{ ocBackground } clWindow,
{ ocGutter } clCream,
{ ocGutterEdge } clGray,
{ ocHighlight } $E0E0E0,
{ ocHighlightFont } clBlack,
{ ocPropName } clBtnText,
{ ocValue } clNavy,
{ ocDefValue } clNavy,
{ ocValueDifferBackgrnd} clWindow,
{ ocSubProp } clGreen,
{ ocReference } clMaroon,
{ ocReadOnly } clGrayText
);
Options: (
{ ooShowComponentTree } True,
@ -213,6 +216,7 @@ begin
Items.Add(dlgPropNameColor);
Items.Add(dlgValueColor);
Items.Add(dlgDefValueColor);
Items.Add(dlgDifferentValueBackgroundColor);
Items.Add(dlgSubPropColor);
Items.Add(dlgReferenceColor);
Items.Add(dlfReadOnlyColor)
@ -286,6 +290,7 @@ begin
ASettings.Colors[ocPropName] := o.PropertyNameColor;
ASettings.Colors[ocValue] := o.ValueColor;
ASettings.Colors[ocDefValue] := o.DefaultValueColor;
ASettings.Colors[ocValueDifferBackgrnd] := o.ValueDifferBackgrndColor;
ASettings.Colors[ocSubProp] := o.SubPropertiesColor;
ASettings.Colors[ocReference] := o.ReferencesColor;
ASettings.Colors[ocReadOnly] := o.ReadOnlyColor;
@ -317,6 +322,7 @@ begin
o.PropertyNameColor := ColorsListBox.Colors[Ord(ocPropName)];
o.ValueColor := ColorsListBox.Colors[Ord(ocValue)];
o.DefaultValueColor := ColorsListBox.Colors[Ord(ocDefValue)];
o.ValueDifferBackgrndColor := ColorsListBox.Colors[Ord(ocValueDifferBackgrnd)];
o.SubPropertiesColor := ColorsListBox.Colors[Ord(ocSubProp)];
o.ReferencesColor := ColorsListBox.Colors[Ord(ocReference)];
o.ReadOnlyColor := ColorsListBox.Colors[Ord(ocReadOnly)];

View File

@ -1450,13 +1450,14 @@ resourcestring
lisToolHeaderScrolledUp = 'Tool Header: Scrolled up';
dlgSubPropColor = 'SubProperties';
dlgReferenceColor = 'Reference';
dlgValueColor = 'Value';
lisAllBuildModes = '<All build modes>';
lisNameOfActiveBuildMode = 'Name of active build mode';
dlfReadOnlyColor = 'Read Only';
dlgHighlightColor = 'Highlight Color';
dlgHighlightFontColor = 'Highlight Font Color';
dlgValueColor = 'Value';
dlgDefValueColor = 'Default Value';
dlgDifferentValueBackgroundColor = 'Different values background';
dlgPropNameColor = 'Property Name';
dlgGutterEdgeColor = 'Gutter Edge Color';