Jump to content

Carlo Barazzetta

Members
  • Content Count

    32
  • Joined

  • Last visited

  • Days Won

    5

Carlo Barazzetta last won the day on July 23

Carlo Barazzetta had the most liked content!

Community Reputation

66 Excellent

About Carlo Barazzetta

  • Birthday 02/12/1968

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Carlo Barazzetta

    Looking for SVG support in Delphi?

    Good news about 2.4.0 version of SVGIconImageList: - Added new engine: Image32 library (ver.3.0) by Angus Johnson (VCL+FMX) - Image32 is now the default native Delphi engine, because has more SVG functionalities like blur, gradient, merge, drop-shadow, markers, simbol, pattern, subpixel. - Added support for Android and iOS platforms (by Image32 engine) - Added support for backward Delphi versions (from XE3) - Added demo to compare the four engines (SVGViewer)
  2. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    I've created the BUG report: https://quality.embarcadero.com/browse/RSP-33760 Please vote for it. bye Carlo
  3. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    No, I haven't reported the BUG yet, I was hoping to be able to find the problem and also provide a possible solution ...
  4. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    At the moment I've resolved rewriting WMGetMinMaxInfo handler using other variables (MinFormWidth, MinFormHeight, MaxFormWidth, MaxFormHeight: Integer;) into my base form of the application. procedure TBaseForm.WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); var LMinMaxInfo: PMinMaxInfo; begin if not (csReading in ComponentState) then begin LMinMaxInfo := Message.MinMaxInfo; with LMinMaxInfo^ do begin with ptMinTrackSize do begin if MinFormWidth > 0 then X := MinFormWidth; if MinFormHeight > 0 then Y := MinFormHeight; end; with ptMaxTrackSize do begin if MaxFormWidth > 0 then X := MaxFormWidth; if MaxFormHeight > 0 then Y := MaxFormHeight; end; ConstrainedResize(ptMinTrackSize.X, ptMinTrackSize.Y, ptMaxTrackSize.X, ptMaxTrackSize.Y); end; end; inherited; end;
  5. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    But in my configuration the primary monitor is monitor 1 with 96 DPI, the application is on monitor 1 (the primary) and the bug is present also on primary monitor.
  6. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    Zip of Project and video demo. HighDPI_test.mp4 HighDPI-test.7z
  7. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    Thanks for the test, I've changed my secondo monitor to 144dpi but the problem is the same... I've upgraded my Windows10 version to 20H2 build but the problem still persist...
  8. Carlo Barazzetta

    A BIG and very strange BUG with High-DPI, VCL Style and Form Constraints

    It's not a configuration problem because the application starts with correct DPI. At the first Minimize/Maximize receive a wrong DPI (the DPI of the secondary monitor), at the second Minimize/Maximize receive the correct DPI, and so on. But this appens ONLY if I'm using a VCLStyle and I have defined min constraint for the form and the current WindowsState is wsMaximized.
  9. I have encountered this problem affecting High-DPI support with VCL-Styles Enabled. Scenario: Main monitor: 96 dpi Secondary monitor: 192 dpi Per monitor V2 enabled "Empty" application with main form with: Constraints.MinHeight = 400 Constraints.MinWidth = 300 WindowState = wsMaximized VCLStyle active. 1) Run (the form is full screen on the main monitor) 2) Minimize form. 3) Maximize form: BUG! appears in full screen on the main monitor but with a dpi of 192 !!! 4) Re-Minimize form. 5) Re-Maximize: appears in full screen on the main monitor but with a dpi of 96 (returns to correct scale) The three factors that determine the problem are: 1) presence of MinHeight and MinWidth Constraint 2) active VCL style 3) a secondary monitor with different dpi (on which the application never runs) Tested with D10.4.2 and Win10: anyone can confirm this problem or try it on other versions of windows? Using the AfterMonitorDpiChanged event, on the first call after "maximize" the NewDPI value is 192, on the second call returns to 92. the project: program StyleTest; uses Vcl.Forms, UstyleTest in 'UstyleTest.pas' {Form5}, Vcl.Themes, Vcl.Styles; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; TStyleManager.TrySetStyle('Windows10 SlateGray'); Application.CreateForm(TForm5, Form5); Application.Run; end. the main form dfm: object Form5: TForm5 Left = 0 Top = 0 Caption = 'Form5' ClientHeight = 500 ClientWidth = 500 Color = clBtnFace Constraints.MinHeight = 400 Constraints.MinWidth = 300 DoubleBuffered = True Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False WindowState = wsMaximized OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged PixelsPerInch = 96 TextHeight = 13 end the main form pas unit UstyleTest; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm5 = class(TForm) procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer); private { Private declarations } public { Public declarations } end; var Form5: TForm5; implementation {$R *.dfm} procedure TForm5.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, NewDPI: Integer); begin ; end; end.
  10. Carlo Barazzetta

    TTreeNode leak when VCL styles are active

    Very strange that the presence of an empty ImageView in the same form affects the memory leak on another component (the TTreeNodes of the TTreeView) after changing styles!
  11. Carlo Barazzetta

    TTreeNode leak when VCL styles are active

    No, I didn't open a bug report because in my case it was just a demo of a component with on-the-fly style modification on the form itself to show how the component reacted with different styles.
  12. Carlo Barazzetta

    TTreeNode leak when VCL styles are active

    Yes, and I haven't found a solution ...
  13. Carlo Barazzetta

    Native Svg parsing and painting in Windows

    I don't understand ... (a fully armed SVG workshop?). If you don't feel the need to be able to see all the icons in a folder at a glance (Thumbnail mode) and be able to focus on one of those and look at the code on the fly (if it's SVG "clean" and "light") and don't try to see if that icon has colors that suit whatever theme the user chooses (dark or light) maybe we don't do the same job. If you prefer to use PowerToys instead of this solution developed in Delphi no one forces you to install it. I thought we were on a Delphi blog not for C# developers 😉
  14. A new version (1.1) of SVGShellExtensions (Open-Source) has been released with a new component (a very useful SVG Text Editor) and a context-menu to export an SVG file to multiple PNG files. The new Setup is always available on the project page: https://github.com/EtheaDev/SVGShellExtensions The preview panel now has a slider to change the "backlight" of the image and more settings (such as text color attributes, theme, use of native Direct2D). The SVG Text Editor is useful for developers who need to change certain aspects of the icons (such as element colors) or try to change the SVG language and see an instant preview of the changes. Any suggestions for improving these components are welcome!
×