IDE: Option background color for Non Form Designer e.g. TDataModule added - as requested in German Lazarus Forum

git-svn-id: trunk@64820 -
This commit is contained in:
michl 2021-03-15 13:37:40 +00:00
parent 4a439a8841
commit 19c40b93bd
4 changed files with 14 additions and 3 deletions

View File

@ -39,7 +39,7 @@ uses
// IdeIntf
FormEditingIntf,
// IDE
CustomNonFormDesigner;
CustomNonFormDesigner, EnvironmentOpts;
type
@ -152,7 +152,7 @@ begin
with Canvas do begin
if LookupRoot is TDataModule then
begin
Brush.Color:=clWhite;
Brush.Color:=EnvironmentOptions.NonFormBackgroundColor;
ARect:=Rect(FrameWidth,FrameWidth,
ClientWidth-FrameWidth,
ClientHeight-FrameWidth);

View File

@ -592,6 +592,7 @@ type
FRightClickSelects: boolean;
FGrabberColor: TColor;
FMarkerColor: TColor;
FNonFormBackgroundColor: TColor;
FRubberbandSelectionColor: TColor;
FRubberbandCreationColor: TColor;
FRubberbandSelectsGrandChilds: boolean;
@ -852,6 +853,8 @@ type
write FRightClickSelects;
property GrabberColor: TColor read FGrabberColor write FGrabberColor;
property MarkerColor: TColor read FMarkerColor write FMarkerColor;
property NonFormBackgroundColor: TColor read FNonFormBackgroundColor
write FNonFormBackgroundColor;
property RubberbandSelectionColor: TColor read FRubberbandSelectionColor
write FRubberbandSelectionColor;
property RubberbandCreationColor: TColor read FRubberbandCreationColor
@ -2132,6 +2135,7 @@ begin
FRightClickSelects:=true;
FGrabberColor:=clBlack;
FMarkerColor:=clDkGray;
FNonFormBackgroundColor:=clWhite;
FRubberbandSelectionColor:=clNavy;
FRubberbandCreationColor:=clMaroon;
FRubberbandSelectsGrandChilds:=DefaultRubberbandSelectsGrandChilds;
@ -2615,6 +2619,7 @@ begin
FRightClickSelects:=FXMLCfg.GetValue(Path+'FormEditor/RightClickSelects',true);
FGrabberColor:=FXMLCfg.GetValue(Path+'FormEditor/GrabberColor/Value',FGrabberColor);
FMarkerColor:=FXMLCfg.GetValue(Path+'FormEditor/MarkerColor/Value',FMarkerColor);
FNonFormBackgroundColor:=FXMLCfg.GetValue(Path+'FormEditor/NonFormBackgroundColor/Value',FNonFormBackgroundColor);
FRubberbandSelectionColor:=FXMLCfg.GetValue(Path+'FormEditor/Rubberband/SelectionColor/Value',
FRubberbandSelectionColor);
FRubberbandCreationColor:=FXMLCfg.GetValue(Path+'FormEditor/Rubberband/CreationColor/Value',
@ -2981,6 +2986,7 @@ begin
FXMLCfg.SetDeleteValue(Path+'FormEditor/RightClickSelects',FRightClickSelects,true);
FXMLCfg.SetDeleteValue(Path+'FormEditor/GrabberColor/Value',FGrabberColor,clBlack);
FXMLCfg.SetDeleteValue(Path+'FormEditor/MarkerColor/Value',FMarkerColor,clDkGray);
FXMLCfg.SetDeleteValue(Path+'FormEditor/NonFormBackgroundColor/Value',FNonFormBackgroundColor,clWhite);
FXMLCfg.SetDeleteValue(Path+'FormEditor/Rubberband/SelectionColor/Value',
FRubberbandSelectionColor,clBlack);
FXMLCfg.SetDeleteValue(Path+'FormEditor/Rubberband/CreationColor/Value',

View File

@ -41,7 +41,8 @@ type
dcGrabber,
dcMarker,
dcRuberbandSelection,
dcRuberbandCreation
dcRuberbandCreation,
dcNonFormBackgroundColor
);
{ TFormEditorOptionsFrame }
@ -169,6 +170,7 @@ begin
ColorsListBox.Items.Objects[Ord(dcGridLinesRightBottom)] := TObject(PtrInt(GuideLineColorRightBottom));
ColorsListBox.Items.Objects[Ord(dcGrabber)] := TObject(PtrInt(GrabberColor));
ColorsListBox.Items.Objects[Ord(dcMarker)] := TObject(PtrInt(MarkerColor));
ColorsListBox.Items.Objects[Ord(dcNonFormBackgroundColor)] := TObject(PtrInt(NonFormBackgroundColor));
ColorsListBox.Items.Objects[Ord(dcRuberbandSelection)] := TObject(PtrInt(RubberbandSelectionColor));
ColorsListBox.Items.Objects[Ord(dcRuberbandCreation)] := TObject(PtrInt(RubberbandCreationColor));
@ -205,6 +207,7 @@ begin
GuideLineColorRightBottom := ColorsListBox.Colors[Ord(dcGridLinesRightBottom)];
GrabberColor := ColorsListBox.Colors[Ord(dcGrabber)];
MarkerColor := ColorsListBox.Colors[Ord(dcMarker)];
NonFormBackgroundColor := ColorsListBox.Colors[Ord(dcNonFormBackgroundColor)];
RubberbandSelectionColor := ColorsListBox.Colors[Ord(dcRuberbandSelection)];
RubberbandCreationColor := ColorsListBox.Colors[Ord(dcRuberbandCreation)];
@ -253,6 +256,7 @@ begin
Items.Add(dlgMarkerColor);
Items.Add(dlgRuberbandSelectionColor);
Items.Add(dlgRuberbandCreationColor);
Items.Add(dlgNonFormBackgroundColor);
end;
procedure TFormEditorOptionsFrame.ColorBoxChange(Sender: TObject);

View File

@ -1501,6 +1501,7 @@ resourcestring
dlgRightBottomClr = 'Guide lines Right,Bottom';
dlgGrabberColor = 'Grabber color';
dlgMarkerColor = 'Marker color';
dlgNonFormBackgroundColor = 'Non Form Designer background color';
dlgRuberbandSelectionColor = 'Rubberband Selection';
dlgRuberbandCreationColor = 'Rubberband Creation';
dlgRubberbandSelectsGrandChildren = 'Select grandchildren';