Closed Ludens1 closed 3 years ago
Uninstall TB2K & SpTBXLib from the IDE. Delete TB2K & SpTBXLib folders. Unzip, repatch TB2K and install TB2K & SpTBXLib
Of course I follow all these steps. But the result is still the same: [DCC Error] TB2Item.pas(2776): E2003 Undeclared identifier: 'TTBFloatingWindowParent'
Was forced to roll back to 2.5.6 :((
In TB2Dock.pas line 192 there is the following code:
{$IF CompilerVersion >= 33}
TTBVirtualImageList = class(TCustomImageList)
private
FDPIChangedMessageID: Integer;
FSourceImageList: TCustomImageList;
procedure SetSourceImageList(Value: TCustomImageList);
procedure DPIChangedMessageHandler(const Sender: TObject; const Msg: System.Messaging.TMessage);
protected
function GetCount: Integer; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer;
Style: Cardinal; Enabled: Boolean = True); override;
property SourceImageList: TCustomImageList
read FSourceImageList write SetSourceImageList;
property Width;
property Height;
end;
{$ENDIF}
Does changing the {$ENDIF} to {$IFEND} make any difference?
TTBVirtualImageList is not used, for Rio and up is better to use ImageCollection/VirtualImageList
@SilverpointDev ImageCollection/VirtualImageList would not work in this case. VirtualImageList scales the icons according to the PPI of the form it resides. Think of the following:
TTBVirtualImageList is a relatively simple solution to the FloatingWindowParent ImageList problem.
TTBVirtualImageList is a relatively simple solution to the FloatingWindowParent ImageList problem.
I have removed TTBVirtualImageList and added support for ImageCollection/VirtualImageList. Take a look at the release notes:
TB2Common.pas changes: added various global function helpers to support TImageCollection and TVirtualImageList, using RTTI to access fields, properties and methods of structures on VirtualImageList and ImageCollection. Otherwise we must include vclwinx.bpl package to the Requires section of the dpk, doing so we must create different packages for different Delphi versions. vclwinx was introduced in Delphi Seattle but TImageCollection and TVirtualImagelist were introduced on Rio. If we add vclwinx package and access TImageCollection and TVirtualImageList directly then we can delete the helpers. We must use SpGetScaledVirtualImageListSize to get the correct VirtualImageList size. We must use SpDrawVirtualImageList to draw an image on the VirtualImageList.
TB2Dock.pas changes: removed TTBVirtualImageList, it was added by Kiriakos Vlahos to scale the toolbar images when the floating toolbar was placed on a different monitor. The scaling was done by stretching the images with HQ bicubic interpolation. It was removed because TVirtualImageList support was added. In my opinion TVirtualImageList is a better solution, instead of stretching the images and adding blur TVirtualImageList tries to find the correct image in the ImageCollection based on the size.
@Ludens1 Can you test the latest commit?
Of course, sir! But unfortunately... [DCC Fatal Error] TB2Common.pas(164): F1026 File not found: 'UITypes.dcu' The latest patcher used. Win7, DXE
@Ludens1 Fixed, can you try the latest?
@SilverpointDev [DCC Error] TB2Common.pas(1609): E2003 Undeclared identifier: 'TColorRec' The newest patch, Win7, Delphi XE
@Ludens1 I think it's fixed now.
TB2K compiled successful now!
But new SpTBXLib... [DCC Fatal Error] SpTBXSkins.pas(70): F1026 File not found: 'Styles.dcu'
Fixed
[DCC Error] SpTBXControls.pas(2753): E2003 Undeclared identifier: 'IsZero'
Delphi XE
Ok, tested and fixed.
Yyyesss!! Thank you, sir! Are you going to publish it on silverpointdevelopment.com?
Yes, new version 2.5.8 published.
https://github.com/SilverpointDev/sptbxlib/issues/73#issuecomment-764983571