Hi Wp,
You made some changes to correct the "disappearing tabs" problem last November, that I installed, at that time, in my Laz 1.84:
File name on my system: (I'll call this the November 2019 file, because that's when I got your edits last time)
C:\Lazarus184\config_lazarus\onlinepackagemanager\packages\jvcllaz\run\JvCustomControls\jvimagesviewer.pas
I have now installed Laz 2.0.10 and JV controls from the On-Line Package Manager, and I did a "Beyond Compare".
The files are different, so I'm thinking... to avoid this bug in the 2.0.10 IDE, should I make the edits in my "2010" file, so it matches your edits, or not?
File name on my system: (I'll call this the January 2021 file, because that's when I acquired it)
C:\Installs\Lazarus_2010_Cnfg\onlinepackagemanager\packages\jvcllaz\run\JvCustomControls\jvimagesviewer.pas
November 2019 has these edits that the January 2021 file does not:
(Added/Changed lines are indicated, other lines are the same in both files)
private
FImagePadding: Integer;
FFrameColor: TColor;
FHotFrameSize: Integer;
FHotColor: TColor;
FTransparent: Boolean;
function IsImagePaddingStored: Boolean; <---- Added
procedure SetImagePadding(const Value: Integer);
procedure SetFrameColor(const Value: TColor);
procedure SetHotColor(const Value: TColor);
procedure SetHotFrameSize(const Value: Integer);
procedure SetTransparent(const Value: Boolean);
protected
{$IF LCL_FullVersion >= 1080000} <---- Added
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
{$IFEND} <---- Added
published
property AutoCenter;
property Alignment;
property BrushPattern;
property DragAutoScroll;
property FrameColor: TColor read FFrameColor write SetFrameColor default clGray;
property Height;
property HorzSpacing;
property HotColor: TColor read FHotColor write SetHotColor default clHighlight;
property HotFrameSize: Integer read FHotFrameSize write SetHotFrameSize default 2;
property HotTrack;
property ImagePadding: Integer read FImagePadding write SetImagePadding stored IsImagePaddingStored; <---- Changed
// Corresponding line in January 2021 file: property ImagePadding: Integer read FImagePadding write SetImagePadding default DEFAULT_IMAGEVIEWEROPTIONS_IMAGEPADDING;
property Layout;
property LazyRead;
property MultiSelect;
property ReduceMemoryUsage;
property RightClickSelect;
property Transparent: Boolean read FTransparent write SetTransparent default False;
property ScrollBar;
property ShowCaptions default True;
property Tracking;
property VertSpacing;
property Width;
end;
constructor TJvImageViewerOptions.Create(AOwner: TJvCustomItemViewer);
begin
inherited Create(AOwner);
FImagePadding := Owner.Scale96ToFont(DEFAULT_IMAGEVIEWEROPTIONS_IMAGEPADDING); <-- Changed
// Corresponding line in January 2021 file: FImagePadding := DEFAULT_IMAGEVIEWEROPTIONS_IMAGEPADDING;
FFrameColor := clGray;
FHotColor := clHighlight;
FHotFrameSize := 2;
ShowCaptions := True;
end;
{$IF LCL_FullVersion >= 1080000}
procedure TJvImageViewerOptions.DoAutoAdjustLayout(
const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);
begin
inherited;
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
begin
if IsImagePaddingStored then <-- Added
FImagePadding := Round(FImagePadding * AXProportion);
end;
end;
{$IFEND}
function TJvImageViewerOptions.IsImagePaddingStored: Boolean;
begin
Result := FImagePadding <> Owner.Scale96ToFont(DEFAULT_IMAGEVIEWEROPTIONS_IMAGEPADDING);
end;
procedure TJvPictureItem.DoLoadProgress(Sender: TObject;
Stage: TFPImgProgressStage; PercentDone: Byte; RedrawNow: Boolean;
const R: TRect; const Msg: AnsiString; var Continue: Boolean);
begin
if Owner is TJvImagesViewer then <-- Changed
Corresponding line in January 2021 file: if Continue and (Owner is TJvImagesViewer) then
TJvImagesViewer(Owner).DoLoadProgress(Self, Stage, PercentDone, RedrawNow, R, Msg);
end;
So my question is: Should I make the January 2021 file look like the November 2019 file and recompile my Lazarus 2.0.10 IDE ?