Skip to content

Commit

Permalink
Настройка цвета линий в инспекторе
Browse files Browse the repository at this point in the history
  • Loading branch information
zamtmn committed Oct 16, 2024
1 parent 74cfa94 commit e107244
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cad_source/components/zobjectinspector/zcobjectinspector.pas
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ procedure Register;
INTFObjInspShowOnlyHotFastEditors:boolean=true;
INTFDefaultControlHeight:integer=21;
INTFObjInspLevel0HeaderColor:TColor=clDefault;
INTFObjInspBorderColor:TColor=clDefault;

LocalRowHeight:integer=21;
LocalRowHeightOverride:boolean=false;
Expand Down Expand Up @@ -651,7 +652,8 @@ function DrawRect(ACanvas:TCanvas;ARect:TRect;AActive:Boolean;AOnMouse:Boolean;A
result:=ThemeServices.GetElementDetails(ttItemSelected);

tc:=ACanvas.Brush.Color;
ACanvas.Brush.Color:=clGrayText;
if INTFObjInspBorderColor<>clDefault then
ACanvas.Pen.Color:=INTFObjInspBorderColor;
if AActive then begin
ACanvas.Brush.Color := clHighlight{clBtnHiLight};
ACanvas.Pen.Style:=psDot;
Expand Down
4 changes: 3 additions & 1 deletion cad_source/zcad/gui/odjectinspector/uzcoiregister.pas
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ procedure ZCADFormSetupProc(Form:TControl);
tb.AutoSize:=true;
tb.ShowCaptions:=true;
tb.Align:=alTop;
tb.EdgeBorders:=[ebBottom];
tb.EdgeBorders:=[];//[ebBottom];
ToolBarsManager.CreateToolbarContent(tb,TBNode);
tb.Parent:=tform(Form);
end;
Expand Down Expand Up @@ -304,6 +304,7 @@ initialization
system_pas_path:=expandpath('$(ZCADPath)/rtl/system.pas');
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_WhiteBackground','Boolean',@INTFObjInspWhiteBackground);
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_Level0HeaderColor','Integer',@INTFObjInspLevel0HeaderColor);
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_BorledColor','Integer',@INTFObjInspBorderColor);
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowHeaders','Boolean',@INTFObjInspShowHeaders);
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowSeparator','Boolean',@INTFObjInspShowSeparator);
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_OldStyleDraw','Boolean',@INTFObjInspOldStyleDraw);
Expand All @@ -320,6 +321,7 @@ initialization
units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ButtonSizeReducing','Integer',@INTFObjInspButtonSizeReducing);
SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_RowHeight:=@INTFObjInspRowHeight;
SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_Level0HeaderColor:=@INTFObjInspLevel0HeaderColor;
SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_BorderColor:=@INTFObjInspBorderColor;
zcobjectinspector.INTFDefaultControlHeight:=sysparam.notsaved.defaultheight;
ZCADGUIManager.RegisterZCADFormInfo('ObjectInspector',rsGDBObjinspWndName,TGDBobjinsp,rect(0,100,200,600),ZCADFormSetupProc,CreateObjInspInstance,@GDBobjinsp);
PropertyRowName:=rsProperty;
Expand Down
1 change: 1 addition & 0 deletions cad_source/zcad/uzcsysvars.pas
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ tobjinspinterface=record
INTF_ObjInsp_ShowHeaders:PBoolean;(*'Show headers'*)
INTF_ObjInsp_OldStyleDraw:PBoolean;(*'Old style'*)
INTF_ObjInsp_Level0HeaderColor:PTZColor;(*'Level0 header color'*)
INTF_ObjInsp_BorderColor:PTZColor;(*'Border color'*)
INTF_ObjInsp_WhiteBackground:PBoolean;(*'White background'*)
INTF_ObjInsp_ShowSeparator:PBoolean;(*'Show separator'*)
INTF_ObjInsp_ShowFastEditors:PBoolean;(*'Show fast editors'*)
Expand Down

0 comments on commit e107244

Please sign in to comment.