diff --git a/designer/noncontroldesigner.pas b/designer/noncontroldesigner.pas index 76287c5295..9473a5f07b 100644 --- a/designer/noncontroldesigner.pas +++ b/designer/noncontroldesigner.pas @@ -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); diff --git a/ide/environmentopts.pp b/ide/environmentopts.pp index 4de1812c97..fb3b99c210 100644 --- a/ide/environmentopts.pp +++ b/ide/environmentopts.pp @@ -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', diff --git a/ide/frames/formed_options.pas b/ide/frames/formed_options.pas index de15fe5c71..fac3c8aee2 100644 --- a/ide/frames/formed_options.pas +++ b/ide/frames/formed_options.pas @@ -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); diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index e2b3ef6ae4..06888131a4 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -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';