
05-09-2023, 10:21
|
 |
Registered User
|
|
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,443 Times in 547 Posts
|
|
FMXInno - Updates
FMXInno - Updates : [2023-September-05]
This is a quality update fix for FMXInno on August 31.
Code:
* Fixed for higher DPI values.
* Updated IsOSMatched for Windows 11 23H2 (Sun Valley 3) update.
- if IsOsMatched(B_WIN11_23H2) then ...
* Updated FluentAPI v2.0.
* Updated ISArcEx.
* Other quality improvements and bug fixes.
NOTE:
* Effective from this update onward, InnoSetup v5.6.1 or a newer version is required.
-------------------------------------------------------------------------------------------------------------------------------------------
Quote:
FMXInno - Updates : [2023-August-31]
Code:
* Added TImageList.
* Added TSpeedButton.
* Added TCornorButton.
* Added TMultiView.
* Added TShadowTextClassic.
* Added new functions.
* Added new properties.
* Included the fix for the 'white-square' issue during loading.
- Don't forget to call the 'FMXForm.Show' after the 'FMXDesigning' procedure.
* Fixed DrawFrame.
* Some improvements and bug fixes.
------------------------------------------------------------------------------------------------------------------------------
Quote:
Originally Posted by Cesar82
@BLACKFIRE69, I don't follow your project very much, but I have a question.
Is it possible to define shadows in the labels and define a position for them with respect to the text like in CIU?
If you still don't have support for this, it would be interesting to have X and Y options to move the shadow with a default value of 1px position in relation to left and Top, or parameters for X and Y position for the shadow, with the default position being the shadow exactly in the position of the text.
Code:
procedure ShadowSetting(FColor: Integer; FOpacity, FSoftness: Single; FPosX, FPosY: Integer);
|
now we've the 'TShadowTextClassic' class, which allows users to change the position(X, Y) of the shadow.
Code:
procedure Shadow(FColor: TAlphaColor; OffsetX, OffsetY: Single);
------------------------------------------------------------------------------------------------------------------------------
Quote:
Originally Posted by audiofeel
@BLACKFIRE69
Thanks for the update. Please answer, Can you make it so that you can take the icons from the system and not take them with you. By simply specifying the file index and icon, as is possible for any file on the system. And for displaying disks, and for displaying buttons "close the window", "minimize the window" and for many others. If not, then I'm just passing by.
|
i've added three new functions to help accomplish this.
Code:
function wGetSysDefaultIcons(const Src: WideString; SHLIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;
function wGetSysDefaultIcons2(const Src, OutImgFile: WideString; SHLIcoSize: Cardinal): Boolean;
function wGetSysDefaultIconsSize(const Src: WideString; SHLIcoSize: Cardinal): Integer;
these functions allow you to extract icons in different sizes as listed below.
Code:
const
SHL_ICO_SZ_LARGE = $0000; // 32x32 pixels.
SHL_ICO_SZ_SMALL = $0001; // 16x16 pixels.
SHL_ICO_SZ_EXTRALARGE = $0002; // 48x48 pixels.
SHL_ICO_SZ_SYSSMALL = $0003; // SM_CXSMICON x SM_CYSMICON pixels.
SHL_ICO_SZ_JUMBO = $0004; // 256x256 pixels. (Windows Vista and later.)
here 'Src' could be a file, directory or desktop shortcut (.lnk).
you'll find an example for this in the attachment
at the moment, if i extract icons from a windows ResDll using an index, then those icon files will only be '32x32' in maximum size. so let's use above functions.
Example:
Code:
{ GetSysDefaultIcons }
if wGetLogicalDriveList(ADrvLst, CDrvIdx) then
begin
ASrc[1] := ADrvLst[CDrvIdx];
ASrc[2] := ADrvLst[Length(ADrvLst) -1];
end else
begin
ASrc[1] := 'C:\';
if wIsDriveValid('D:\') then ASrc[2] := 'D:\'
else if wIsDriveValid('E:\') then ASrc[2] := 'E:\'
else if wIsDriveValid('F:\') then ASrc[2] := 'F:\'
else if wIsDriveValid('G:\') then ASrc[2] := 'G:\'
end;
ASrc[3] := 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe';
ASrc[4] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Desktop';
ASrc[5] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Downloads';
ASrc[6] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Documents';
P := 0; Q := 0;
Code:
for i := 1 to C_RANGE do
begin
if i = (C_RANGE div 2) + 1 {i =4} then
begin
P := 0; Q := 160;
end;
AImage[i].FCreate(FMXForm.Handle);
AImage[i].SetBounds(NSX(P + 80), NSY(Q + 80), NSX(100), NSY(100));
#ifdef AMethod1 /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i] */
ImgSize[i] := wGetSysDefaultIconsSize(ASrc[i], SHL_ICO_SZ_JUMBO);
if ImgSize[i] <> -1 then
begin
SetLength(Buffer[i], ImgSize[i]);
if wGetSysDefaultIcons(ASrc[i], SHL_ICO_SZ_JUMBO, Buffer[i], Count[i]) <> -1 then
AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
end;
#else /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
if wGetSysDefaultIcons2(ASrc[i], ImgFile[i], SHL_ICO_SZ_JUMBO) then
begin
AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
end;
#endif
P := P + 150;
end;
{ GetSysDefaultIcons }
'LoadImgFromBuffer' is only supported by the 'FImage' control. Other controls will get this support in future updates.
------------------------------------------------------------------------------------------------------------------------------
Quote:
Originally Posted by audiofeel
MultiView. Needed sometimes. beautiful and modern thing, it's a pity that it is not in FMXInno... 
|
the 'TMultiView' class has been added. an example for this could be found in the attachment.
|
The first post has been updated.
.
Last edited by BLACKFIRE69; 14-07-2024 at 02:04.
|