Jump to content
dummzeuch

GExperts 1.3.19 Alpha 2 for Delphi 11 Patch 2

Recommended Posts

Embarcadero has released a second patch (called November Patch) for Delphi 11 which seems to fix several issues that blocked further progress on GExperts for Delphi 11. So here it is, fresh out of the compiler: The second Alpha version of GExperts for Delphi 11.

Please keep in mind: This is not even a Beta version! There will be bugs and these will not only be UI glitches but functionality failures!

You have been warned!

 

read on in the blog post.

  • Like 1

Share this post


Link to post
3 hours ago, pyscripter said:

Toolbar images are not scaled but otherwise looks good!

Kinda fixed that today for two dialogs.

Share this post


Link to post
3 hours ago, dummzeuch said:

Fixed the toolbars for all dialogs

An alternative to the method Žarko Gajić described is the following code:

 

 
function ScaleImageList(Source: TCustomImageList; M, D: Integer): TCustomImageList;
const
  ANDbits: array[0..2*16-1] of  Byte = ($FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF,
                                        $FF,$FF);
  XORbits: array[0..2*16-1] of  Byte = ($00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00,
                                        $00,$00);
var
  I: integer;
  Icon: HIcon;
begin
  Result := TCustomImageList.CreateSize(MulDiv(Source.Width, M, D), MulDiv(Source.Height, M, D));

  if M = D then
  begin
    Result.Assign(Source);
    Exit;
  end;

  Result.ColorDepth := cd32Bit;
  Result.DrawingStyle := Source.DrawingStyle;
  Result.BkColor := Source.BkColor;
  Result.BlendColor := Source.BlendColor;
  for I := 0 to Source.Count-1 do
  begin
    Icon := ImageList_GetIcon(Source.Handle, I, LR_DEFAULTCOLOR);
    if Icon = 0 then
    begin
      Icon := CreateIcon(hInstance,16,16,1,1,@ANDbits,@XORbits);
    end;
    ImageList_AddIcon(Result.Handle, Icon);
    DestroyIcon(Icon);
  end;
end;

It is simpler and I think works better.

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×