mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-10 15:59:35 +01:00
ideintf: move default colors to const section and use that consts everywhere
ide: add 2 buttons to set default lazarus and delphi colors for the object inspector git-svn-id: trunk@17387 -
This commit is contained in:
parent
419086f5a8
commit
db04b7c32d
@ -4,8 +4,8 @@ inherited OIOptionsFrame: TOIOptionsFrame
|
|||||||
ClientHeight = 395
|
ClientHeight = 395
|
||||||
ClientWidth = 598
|
ClientWidth = 598
|
||||||
Visible = False
|
Visible = False
|
||||||
DesignLeft = 88
|
DesignLeft = 66
|
||||||
DesignTop = 116
|
DesignTop = 87
|
||||||
object ObjectInspectorColorsGroupBox: TGroupBox[0]
|
object ObjectInspectorColorsGroupBox: TGroupBox[0]
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
@ -52,6 +52,41 @@ inherited OIOptionsFrame: TOIOptionsFrame
|
|||||||
OnChange = ColorBoxChange
|
OnChange = ColorBoxChange
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
object BtnUseDefaultLazarusColors: TButton
|
||||||
|
AnchorSideLeft.Control = ColorsListBox
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = ColorsListBox
|
||||||
|
Left = 222
|
||||||
|
Height = 25
|
||||||
|
Top = 6
|
||||||
|
Width = 162
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'BtnUseDefaultLazarusColors'
|
||||||
|
Constraints.MinHeight = 25
|
||||||
|
Constraints.MinWidth = 75
|
||||||
|
OnClick = BtnUseDefaultLazarusColorsClick
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object BtnUseDefaultDelphiColors: TButton
|
||||||
|
AnchorSideLeft.Control = ColorsListBox
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = BtnUseDefaultLazarusColors
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = BtnUseDefaultLazarusColors
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 222
|
||||||
|
Height = 25
|
||||||
|
Top = 37
|
||||||
|
Width = 162
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
Caption = 'BtnUseDefaultDelphiColors'
|
||||||
|
Constraints.MinHeight = 25
|
||||||
|
Constraints.MinWidth = 75
|
||||||
|
OnClick = BtnUseDefaultDelphiColorsClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object OIMiscGroupBox: TGroupBox[1]
|
object OIMiscGroupBox: TGroupBox[1]
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
LazarusResources.Add('TOIOptionsFrame','FORMDATA',[
|
LazarusResources.Add('TOIOptionsFrame','FORMDATA',[
|
||||||
'TPF0'#241#15'TOIOptionsFrame'#14'OIOptionsFrame'#6'Height'#3#139#1#5'Width'#3
|
'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'
|
+'V'#2#12'ClientHeight'#3#139#1#11'ClientWidth'#3'V'#2#7'Visible'#8#10'Design'
|
||||||
+'Left'#2'X'#9'DesignTop'#2't'#0#242#2#0#9'TGroupBox'#29'ObjectInspectorColor'
|
+'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
|
+'sGroupBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7
|
||||||
+#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9
|
+#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'
|
+'asrBottom'#6'Height'#3#186#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'akLef'
|
||||||
@ -23,38 +23,53 @@ LazarusResources.Add('TOIOptionsFrame','FORMDATA',[
|
|||||||
+'Top'#3#140#0#5'Width'#3#210#0#5'Style'#11#16'cbStandardColors'#16'cbExtende'
|
+'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'
|
+'dColors'#14'cbSystemColors'#13'cbCustomColor'#13'cbPrettyNames'#0#20'Border'
|
||||||
+'Spacing.Around'#2#6#10'ItemHeight'#2#16#8'OnChange'#7#14'ColorBoxChange'#8
|
+'Spacing.Around'#2#6#10'ItemHeight'#2#16#8'OnChange'#7#14'ColorBoxChange'#8
|
||||||
+'TabOrder'#2#1#0#0#0#242#2#1#9'TGroupBox'#14'OIMiscGroupBox'#22'AnchorSideLe'
|
+'TabOrder'#2#1#0#0#7'TButton'#26'BtnUseDefaultLazarusColors'#22'AnchorSideLe'
|
||||||
+'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#29'ObjectInspectorColors'
|
+'ft.Control'#7#13'ColorsListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'A'
|
||||||
+'GroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'
|
+'nchorSideTop.Control'#7#13'ColorsListBox'#4'Left'#3#222#0#6'Height'#2#25#3
|
||||||
+#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#3#184#0#3'Top'
|
+'Top'#2#6#5'Width'#3#162#0#8'AutoSize'#9#7'Caption'#6#26'BtnUseDefaultLazaru'
|
||||||
+#3#193#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Bo'
|
+'sColors'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'#7'OnC'
|
||||||
+'rderSpacing.Top'#2#7#7'Caption'#6#14'OIMiscGroupBox'#12'ClientHeight'#3#166
|
+'lick'#7#31'BtnUseDefaultLazarusColorsClick'#8'TabOrder'#2#2#0#0#7'TButton'
|
||||||
+#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#1#0#6'TLabel'#24'OIDefaultItemHeight'
|
+#25'BtnUseDefaultDelphiColors'#22'AnchorSideLeft.Control'#7#13'ColorsListBox'
|
||||||
+'Label'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Con'
|
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#26'BtnUs'
|
||||||
+'trol'#7#23'OIDrawGridLinesCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4
|
+'eDefaultLazarusColors'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideR'
|
||||||
+'Left'#2#6#6'Height'#2#14#3'Top'#2'j'#5'Width'#3#18#2#7'Anchors'#11#5'akTop'
|
+'ight.Control'#7#26'BtnUseDefaultLazarusColors'#20'AnchorSideRight.Side'#7#9
|
||||||
+#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6
|
+'asrBottom'#4'Left'#3#222#0#6'Height'#2#25#3'Top'#2'%'#5'Width'#3#162#0#7'An'
|
||||||
+#7'Caption'#6#24'OIDefaultItemHeightLabel'#11'ParentColor'#8#0#0#9'TCheckBox'
|
+'chors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.To'
|
||||||
+#18'OIShowHintCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'A'
|
+'p'#2#6#7'Caption'#6#25'BtnUseDefaultDelphiColors'#21'Constraints.MinHeight'
|
||||||
+'nchorSideTop.Control'#7#14'OIMiscGroupBox'#4'Left'#2#6#6'Height'#2#19#3'Top'
|
+#2#25#20'Constraints.MinWidth'#2'K'#7'OnClick'#7#30'BtnUseDefaultDelphiColor'
|
||||||
+#2#6#5'Width'#3#130#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7
|
+'sClick'#8'TabOrder'#2#3#0#0#0#242#2#1#9'TGroupBox'#14'OIMiscGroupBox'#22'An'
|
||||||
+'Caption'#6#18'OIShowHintCheckBox'#8'TabOrder'#2#0#0#0#9'TSpinEdit'#27'OIDef'
|
+'chorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#29'ObjectInspe'
|
||||||
+'aultItemHeightSpinEdit'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21
|
+'ctorColorsGroupBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh'
|
||||||
+'AnchorSideTop.Control'#7#24'OIDefaultItemHeightLabel'#18'AnchorSideTop.Side'
|
+'t.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#3
|
||||||
+#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25#3'Top'#2'~'#5'Width'#2'E'#18'Bord'
|
+#184#0#3'Top'#3#193#0#5'Width'#3'V'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR'
|
||||||
+'erSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8'TabOrder'#2#1#5'Value'#2#1#0
|
+'ight'#0#17'BorderSpacing.Top'#2#7#7'Caption'#6#14'OIMiscGroupBox'#12'Client'
|
||||||
+#0#9'TCheckBox'#18'OIAutoShowCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMis'
|
+'Height'#3#166#0#11'ClientWidth'#3'R'#2#8'TabOrder'#2#1#0#6'TLabel'#24'OIDef'
|
||||||
+'cGroupBox'#21'AnchorSideTop.Control'#7#18'OIShowHintCheckBox'#18'AnchorSide'
|
+'aultItemHeightLabel'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'Anc'
|
||||||
+'Top.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3'Top'#2#31#5'Width'#3
|
+'horSideTop.Control'#7#23'OIDrawGridLinesCheckBox'#18'AnchorSideTop.Side'#7#9
|
||||||
+#134#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7'Caption'#6#18
|
+'asrBottom'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'j'#5'Width'#3#18#2#7'Anchors'
|
||||||
+'OIAutoShowCheckBox'#8'TabOrder'#2#2#0#0#9'TCheckBox'#24'OIBoldNonDefaultChe'
|
+#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpac'
|
||||||
+'ckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Con'
|
+'ing.Top'#2#6#7'Caption'#6#24'OIDefaultItemHeightLabel'#11'ParentColor'#8#0#0
|
||||||
+'trol'#7#18'OIAutoShowCheckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'
|
+#9'TCheckBox'#18'OIShowHintCheckBox'#22'AnchorSideLeft.Control'#7#14'OIMiscG'
|
||||||
+#2#6#6'Height'#2#19#3'Top'#2'8'#5'Width'#3#159#0#18'BorderSpacing.Left'#2#6
|
+'roupBox'#21'AnchorSideTop.Control'#7#14'OIMiscGroupBox'#4'Left'#2#6#6'Heigh'
|
||||||
+#17'BorderSpacing.Top'#2#6#7'Caption'#6#24'OIBoldNonDefaultCheckBox'#8'TabOr'
|
+'t'#2#19#3'Top'#2#6#5'Width'#3#130#0#18'BorderSpacing.Left'#2#6#17'BorderSpa'
|
||||||
+'der'#2#3#0#0#9'TCheckBox'#23'OIDrawGridLinesCheckBox'#22'AnchorSideLeft.Con'
|
+'cing.Top'#2#6#7'Caption'#6#18'OIShowHintCheckBox'#8'TabOrder'#2#0#0#0#9'TSp'
|
||||||
+'trol'#7#14'OIMiscGroupBox'#21'AnchorSideTop.Control'#7#24'OIBoldNonDefaultC'
|
+'inEdit'#27'OIDefaultItemHeightSpinEdit'#22'AnchorSideLeft.Control'#7#14'OIM'
|
||||||
+'heckBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#19#3
|
+'iscGroupBox'#21'AnchorSideTop.Control'#7#24'OIDefaultItemHeightLabel'#18'An'
|
||||||
+'Top'#2'Q'#5'Width'#3#153#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'
|
+'chorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25#3'Top'#2'~'#5'W'
|
||||||
+#2#6#7'Caption'#6#23'OIDrawGridLinesCheckBox'#8'TabOrder'#2#4#0#0#0#0
|
+'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
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -38,6 +38,8 @@ type
|
|||||||
{ TOIOptionsFrame }
|
{ TOIOptionsFrame }
|
||||||
|
|
||||||
TOIOptionsFrame = class(TAbstractIDEOptionsEditor)
|
TOIOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||||
|
BtnUseDefaultLazarusColors: TButton;
|
||||||
|
BtnUseDefaultDelphiColors: TButton;
|
||||||
ColorBox: TColorBox;
|
ColorBox: TColorBox;
|
||||||
ColorsListBox: TColorListBox;
|
ColorsListBox: TColorListBox;
|
||||||
ObjectInspectorColorsGroupBox: TGroupBox;
|
ObjectInspectorColorsGroupBox: TGroupBox;
|
||||||
@ -48,6 +50,8 @@ type
|
|||||||
OIDrawGridLinesCheckBox: TCheckBox;
|
OIDrawGridLinesCheckBox: TCheckBox;
|
||||||
OIMiscGroupBox: TGroupBox;
|
OIMiscGroupBox: TGroupBox;
|
||||||
OIShowHintCheckBox: TCheckBox;
|
OIShowHintCheckBox: TCheckBox;
|
||||||
|
procedure BtnUseDefaultDelphiColorsClick(Sender: TObject);
|
||||||
|
procedure BtnUseDefaultLazarusColorsClick(Sender: TObject);
|
||||||
procedure ColorBoxChange(Sender: TObject);
|
procedure ColorBoxChange(Sender: TObject);
|
||||||
procedure ColorsListBoxGetColors(Sender: TCustomColorListBox;
|
procedure ColorsListBoxGetColors(Sender: TCustomColorListBox;
|
||||||
Items: TStrings);
|
Items: TStrings);
|
||||||
@ -55,6 +59,7 @@ type
|
|||||||
private
|
private
|
||||||
FStoredColors: array of TColorRec;
|
FStoredColors: array of TColorRec;
|
||||||
FLoaded: Boolean;
|
FLoaded: Boolean;
|
||||||
|
procedure ChangeColor(AIndex: Integer; NewColor: TColor);
|
||||||
public
|
public
|
||||||
function GetTitle: String; override;
|
function GetTitle: String; override;
|
||||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||||
@ -90,6 +95,10 @@ begin
|
|||||||
FStoredColors[5].ColorName := dlgValueColor;
|
FStoredColors[5].ColorName := dlgValueColor;
|
||||||
FStoredColors[6].ColorName := dlgDefValueColor;
|
FStoredColors[6].ColorName := dlgDefValueColor;
|
||||||
FStoredColors[7].ColorName := dlgPropNameColor;
|
FStoredColors[7].ColorName := dlgPropNameColor;
|
||||||
|
|
||||||
|
BtnUseDefaultLazarusColors.Caption := dlgOIUseDefaultLazarusColors;
|
||||||
|
BtnUseDefaultDelphiColors.Caption := dlgOIUseDefaultDelphiColors;
|
||||||
|
|
||||||
FLoaded := False;
|
FLoaded := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -104,11 +113,42 @@ begin
|
|||||||
Items.AddObject(FStoredColors[i].ColorName, TObject(PtrInt(FStoredColors[i].ColorValue)));
|
Items.AddObject(FStoredColors[i].ColorName, TObject(PtrInt(FStoredColors[i].ColorValue)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOIOptionsFrame.ChangeColor(AIndex: Integer; NewColor: TColor);
|
||||||
|
begin
|
||||||
|
ColorsListBox.Items.Objects[AIndex] := TObject(PtrInt(NewColor));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOIOptionsFrame.ColorBoxChange(Sender: TObject);
|
procedure TOIOptionsFrame.ColorBoxChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if not FLoaded or (ColorsListBox.ItemIndex < 0) then
|
if not FLoaded or (ColorsListBox.ItemIndex < 0) then
|
||||||
Exit;
|
Exit;
|
||||||
ColorsListBox.Items.Objects[ColorsListBox.ItemIndex] := TObject(PtrInt(ColorBox.Selected));
|
ChangeColor(ColorsListBox.ItemIndex, ColorBox.Selected);
|
||||||
|
ColorsListBox.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TOIOptionsFrame.BtnUseDefaultLazarusColorsClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ChangeColor(0, DefBackgroundColor);
|
||||||
|
ChangeColor(1, DefSubPropertiesColor);
|
||||||
|
ChangeColor(2, DefReferencesColor);
|
||||||
|
ChangeColor(3, DefHighlightColor);
|
||||||
|
ChangeColor(4, DefHighlightFontColor);
|
||||||
|
ChangeColor(5, DefValueColor);
|
||||||
|
ChangeColor(6, DefDefaultValueColor);
|
||||||
|
ChangeColor(7, DefNameColor);
|
||||||
|
ColorsListBox.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TOIOptionsFrame.BtnUseDefaultDelphiColorsClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ChangeColor(0, clWindow);
|
||||||
|
ChangeColor(1, clGreen);
|
||||||
|
ChangeColor(2, clMaroon);
|
||||||
|
ChangeColor(3, $E0E0E0);
|
||||||
|
ChangeColor(4, clBlack);
|
||||||
|
ChangeColor(5, clNavy);
|
||||||
|
ChangeColor(6, clNavy);
|
||||||
|
ChangeColor(7, clBtnText);
|
||||||
ColorsListBox.Invalidate;
|
ColorsListBox.Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1033,6 +1033,8 @@ resourcestring
|
|||||||
|
|
||||||
dlgOIMiscellaneous = 'Miscellaneous';
|
dlgOIMiscellaneous = 'Miscellaneous';
|
||||||
dlgOIItemHeight = 'Item height';
|
dlgOIItemHeight = 'Item height';
|
||||||
|
dlgOIUseDefaultLazarusColors = 'Use default Lazarus colors';
|
||||||
|
dlgOIUseDefaultDelphiColors = 'Use default Delphi colors';
|
||||||
lisShowHintsInObjectInspector = 'Show hints in Object Inspector';
|
lisShowHintsInObjectInspector = 'Show hints in Object Inspector';
|
||||||
lisAutoShowObjectInspector = 'Auto show Object Inspector';
|
lisAutoShowObjectInspector = 'Auto show Object Inspector';
|
||||||
lisBoldNonDefaultObjectInspector = 'Bold non default values';
|
lisBoldNonDefaultObjectInspector = 'Bold non default values';
|
||||||
|
|||||||
@ -45,6 +45,15 @@ uses
|
|||||||
const
|
const
|
||||||
OIOptionsFileVersion = 3;
|
OIOptionsFileVersion = 3;
|
||||||
|
|
||||||
|
DefBackgroundColor = clBtnFace;
|
||||||
|
DefReferencesColor = clMaroon;
|
||||||
|
DefSubPropertiesColor = clGreen;
|
||||||
|
DefNameColor = clWindowText;
|
||||||
|
DefDefaultValueColor = clWindowText;
|
||||||
|
DefValueColor = clMaroon;
|
||||||
|
DefHighlightColor = clHighlight;
|
||||||
|
DefHighlightFontColor = clHighlightText;
|
||||||
|
|
||||||
type
|
type
|
||||||
EObjectInspectorException = class(Exception);
|
EObjectInspectorException = class(Exception);
|
||||||
|
|
||||||
@ -478,12 +487,12 @@ type
|
|||||||
procedure SetItemIndexAndFocus(NewItemIndex: integer);
|
procedure SetItemIndexAndFocus(NewItemIndex: integer);
|
||||||
public
|
public
|
||||||
property BackgroundColor: TColor read FBackgroundColor
|
property BackgroundColor: TColor read FBackgroundColor
|
||||||
write SetBackgroundColor default clBtnFace;
|
write SetBackgroundColor default DefBackgroundColor;
|
||||||
property HighlightColor: TColor read FHighlightColor write SetHighlightColor default clHighlight;
|
property HighlightColor: TColor read FHighlightColor write SetHighlightColor default DefHighlightColor;
|
||||||
property ReferencesColor: TColor read FReferencesColor
|
property ReferencesColor: TColor read FReferencesColor
|
||||||
write SetReferences default clMaroon;
|
write SetReferences default DefReferencesColor;
|
||||||
property SubPropertiesColor: TColor read FSubPropertiesColor
|
property SubPropertiesColor: TColor read FSubPropertiesColor
|
||||||
write SetSubPropertiesColor default clGreen;
|
write SetSubPropertiesColor default DefSubPropertiesColor;
|
||||||
property NameFont: TFont read FNameFont write FNameFont;
|
property NameFont: TFont read FNameFont write FNameFont;
|
||||||
property DefaultValueFont: TFont read FDefaultValueFont write FDefaultValueFont;
|
property DefaultValueFont: TFont read FDefaultValueFont write FDefaultValueFont;
|
||||||
property ValueFont: TFont read FValueFont write FValueFont;
|
property ValueFont: TFont read FValueFont write FValueFont;
|
||||||
@ -825,19 +834,19 @@ begin
|
|||||||
FPreferredSplitterX:=FSplitterX;
|
FPreferredSplitterX:=FSplitterX;
|
||||||
FIndent:=9;
|
FIndent:=9;
|
||||||
|
|
||||||
FBackgroundColor:=clBtnFace;
|
FBackgroundColor:=DefBackgroundColor;
|
||||||
FReferencesColor:=clMaroon;
|
FReferencesColor:=DefReferencesColor;
|
||||||
FSubPropertiesColor:=clGreen;
|
FSubPropertiesColor:=DefSubPropertiesColor;
|
||||||
FHighlightColor:=clHighlight;
|
FHighlightColor:=DefHighlightColor;
|
||||||
|
|
||||||
FNameFont:=TFont.Create;
|
FNameFont:=TFont.Create;
|
||||||
FNameFont.Color:=clWindowText;
|
FNameFont.Color:=DefNameColor;
|
||||||
FValueFont:=TFont.Create;
|
FValueFont:=TFont.Create;
|
||||||
FValueFont.Color:=clMaroon;
|
FValueFont.Color:=DefValueColor;
|
||||||
FDefaultValueFont:=TFont.Create;
|
FDefaultValueFont:=TFont.Create;
|
||||||
FDefaultValueFont.Color:=clWindowText;
|
FDefaultValueFont.Color:=DefDefaultValueColor;
|
||||||
FHighlightFont:=TFont.Create;
|
FHighlightFont:=TFont.Create;
|
||||||
FHighlightFont.Color:=clHighlightText;
|
FHighlightFont.Color:=DefHighlightFontColor;
|
||||||
|
|
||||||
FDrawHorzGridLines := True;
|
FDrawHorzGridLines := True;
|
||||||
|
|
||||||
@ -3284,14 +3293,14 @@ begin
|
|||||||
FShowComponentTree:=true;
|
FShowComponentTree:=true;
|
||||||
FComponentTreeHeight:=100;
|
FComponentTreeHeight:=100;
|
||||||
|
|
||||||
FGridBackgroundColor := clBtnFace;
|
FGridBackgroundColor := DefBackgroundColor;
|
||||||
FDefaultValueColor := clWindowText;
|
FDefaultValueColor := DefDefaultValueColor;
|
||||||
FSubPropertiesColor := clGreen;
|
FSubPropertiesColor := DefSubPropertiesColor;
|
||||||
FValueColor := clMaroon;
|
FValueColor := DefValueColor;
|
||||||
FReferencesColor := clMaroon;
|
FReferencesColor := DefReferencesColor;
|
||||||
FPropertyNameColor := clWindowText;
|
FPropertyNameColor := DefNameColor;
|
||||||
FHighlightColor := clHighlight;
|
FHighlightColor := DefHighlightColor;
|
||||||
FHighlightFontColor := clHighlightText;
|
FHighlightFontColor := DefHighlightFontColor;
|
||||||
|
|
||||||
FBoldNonDefaultValues := True;
|
FBoldNonDefaultValues := True;
|
||||||
FDrawGridLines := True;
|
FDrawGridLines := True;
|
||||||
@ -3340,21 +3349,21 @@ begin
|
|||||||
Path+'ComponentTree/Height/Value',100);
|
Path+'ComponentTree/Height/Value',100);
|
||||||
|
|
||||||
FGridBackgroundColor:=ConfigStore.GetValue(
|
FGridBackgroundColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/GridBackground',clBtnFace);
|
Path+'Color/GridBackground',DefBackgroundColor);
|
||||||
FDefaultValueColor:=ConfigStore.GetValue(
|
FDefaultValueColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/DefaultValue', clWindowText);
|
Path+'Color/DefaultValue', DefDefaultValueColor);
|
||||||
FSubPropertiesColor:=ConfigStore.GetValue(
|
FSubPropertiesColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/SubProperties', clGreen);
|
Path+'Color/SubProperties', DefSubPropertiesColor);
|
||||||
FValueColor:=ConfigStore.GetValue(
|
FValueColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/Value', clMaroon);
|
Path+'Color/Value', DefValueColor);
|
||||||
FReferencesColor:=ConfigStore.GetValue(
|
FReferencesColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/References',clMaroon);
|
Path+'Color/References',DefReferencesColor);
|
||||||
FPropertyNameColor:=ConfigStore.GetValue(
|
FPropertyNameColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/PropertyName',clWindowText);
|
Path+'Color/PropertyName',DefNameColor);
|
||||||
FHighlightColor:=ConfigStore.GetValue(
|
FHighlightColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/Highlight',clHighlight);
|
Path+'Color/Highlight',DefHighlightColor);
|
||||||
FHighlightFontColor:=ConfigStore.GetValue(
|
FHighlightFontColor:=ConfigStore.GetValue(
|
||||||
Path+'Color/HighlightFont',clHighlightText);
|
Path+'Color/HighlightFont',DefHighlightFontColor);
|
||||||
|
|
||||||
FShowHints:=ConfigStore.GetValue(
|
FShowHints:=ConfigStore.GetValue(
|
||||||
Path+'ShowHints',FileVersion>=3);
|
Path+'ShowHints',FileVersion>=3);
|
||||||
@ -3407,21 +3416,21 @@ begin
|
|||||||
FComponentTreeHeight,100);
|
FComponentTreeHeight,100);
|
||||||
|
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/GridBackground',
|
ConfigStore.SetDeleteValue(Path+'Color/GridBackground',
|
||||||
FGridBackgroundColor,clBackground);
|
FGridBackgroundColor,DefBackgroundColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/DefaultValue',
|
ConfigStore.SetDeleteValue(Path+'Color/DefaultValue',
|
||||||
FDefaultValueColor,clBackground);
|
FDefaultValueColor,DefDefaultValueColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/SubProperties',
|
ConfigStore.SetDeleteValue(Path+'Color/SubProperties',
|
||||||
FSubPropertiesColor,clBackground);
|
FSubPropertiesColor,DefSubPropertiesColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/Value',
|
ConfigStore.SetDeleteValue(Path+'Color/Value',
|
||||||
FValueColor,clBackground);
|
FValueColor,DefValueColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/References',
|
ConfigStore.SetDeleteValue(Path+'Color/References',
|
||||||
FReferencesColor,clBackground);
|
FReferencesColor,DefReferencesColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/PropertyName',
|
ConfigStore.SetDeleteValue(Path+'Color/PropertyName',
|
||||||
FPropertyNameColor,clWindowText);
|
FPropertyNameColor,DefNameColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/Highlight',
|
ConfigStore.SetDeleteValue(Path+'Color/Highlight',
|
||||||
FHighlightColor,clHighlight);
|
FHighlightColor,DefHighlightColor);
|
||||||
ConfigStore.SetDeleteValue(Path+'Color/HighlightFont',
|
ConfigStore.SetDeleteValue(Path+'Color/HighlightFont',
|
||||||
FHighlightFontColor,clHighlightText);
|
FHighlightFontColor,DefHighlightFontColor);
|
||||||
|
|
||||||
ConfigStore.SetDeleteValue(Path+'ShowHints',FShowHints,
|
ConfigStore.SetDeleteValue(Path+'ShowHints',FShowHints,
|
||||||
true);
|
true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user