I have created two components:
- a graphic component
- a component just with properties, so that I can have more of the first component sharing the same settings (like sharing the same theme/appearance)
A lot of the published properties from the Theme component are of the type single (decimal point numbers).
After installing the component, the half of the properties are OK, the 2nd half are reduced to integer.
The problem is not just in Object Inspector, but also at reading these properties from other components.
property BLCD_FrameColor: TColor read FFrameColor write SetFrameColor default clBtnFace;
property BLCD_BoardColor: TColor read FBoardColor write SetBoardColor default clBlack;
property BLCD_DotColorOn: TColor read FDotColorOn write SetDotColorOn default clSkyBlue;
property BLCD_ColorScheme: TColorScheme read FColorScheme write SetColorScheme default csCustom;
property BLCD_FrameAltitude: integer read FFrameAltitude write SetFrameAltitude default 2;
property BLCD_FrameHeight: integer read FFrameHeight write SetFrameHeight default 8;
property BLCD_FrameSize: integer read FFrameSize write SetFrameSize default 8;
property BLCD_FrameStyle: TFrameStyle read FFrameStyle write SetFrameStyle default fsFlat;
property BLCD_DotShape: TDotShape read FDotShape write SetDotShape default stSquare;
property BLCD_DotSize: integer read FDotSize write SetDotSize default 4;
property BLCD_DotsSpace: integer read FDotsSpace write SetDotsSpace default 1;
property BLCD_DotBlend: boolean read FDotBlend write SetDotBlend default False;
property BLCD_DotBlendOperation: TBlendOperation read FDotBlendOperation write SetDotBlendOperation default boGlow;
property BLCD_DotBlur: boolean read FDotBlur write SetDotBlur default False;
property BLCD_DotBlurRadius: single read FDotBlurRadius write SetDotBlurRadius default 0.8;
property BLCD_BoardShadow: TBoardShadow read FBoardShadow write SetBoardShadow default bsFrame;
property COM_LightSourceIntensity: single read FLightSourceIntensity write SetLightSourceIntensity default 500;
property COM_LightSourceDistanceTerm: single read FLightSourceDistanceTerm write SetLightSourceDistanceTerm default 150;
property COM_LightSourceDistanceFactor: single read FLightSourceDistanceFactor write SetLightSourceDistanceFactor default 1.0;
property COM_LightDestFactor: single read FLightDestFactor write SetLightDestFactor default 1.0;
property COM_LightColor: TColor read FLightColor write SetLightColor default clWhite;
property COM_SpecularFactor: single read FSpecularFactor write SetSpecularFactor default 0.6;
property COM_SpecularIndex: single read FSpecularIndex write SetSpecularIndex default 10;
property COM_AmbientFactor: single read FAmbientFactor write SetAmbientFactor default 0.3;
property COM_DiffusionFactor: single read FDiffusionFactor write SetDiffusionFactor default 0.9;
property COM_NegativeDiffusionFactor: single read FNegativeDiffusionFactor write SetNegativeDiffusionFactor default 0.1;
property COM_DiffuseSaturation: boolean read FDiffuseSaturation write SetDiffuseSaturation default False;
property COM_LightPositionX: integer read FLightPositionX write SetLightPositionX default -100;
property COM_LightPositionY: integer read FLightPositionY write SetLightPositionY default -100;
property COM_LightPositionZ: integer read FLightPositionZ write SetLightPositionZ default 100;
All the properties with BLCD_ in name are OK, all the properties with COM_ in name are reduced to integer and the value is always zero (shows in Object Inspector without decimals).
It helped once when I changed the properties names (it was C_, now is COM_), but today returned to the old problem. Is underscore in properties name a problem?
Problem exists in debug and release mode.
Using Lazarus 2.2.6 with FPC 3.2.2 on Windows 10.