RRUZ / vcl-styles-utils

Extend and improve the Delphi VCL Styles
https://theroadtodelphi.wordpress.com/
329 stars 115 forks source link

TTaskDialog not drawing text correctly in dark themes when hyperlinks are used #314

Open John-Dorlon opened 5 months ago

John-Dorlon commented 5 months ago

Hello,

I am using Delphi 12 and the latest versio of VCL Styles Utils.

Using the code below, if I am using a dark theme such as "Charcoal Dark Slate" (but really any dark theme), then the text in the dialog is painted black on a dark gray background so it is difficult to see. If the hyperlink is excluded, then the text is drawn with theme colors.

Thank you

uses
  Vcl.Styles.UXTheme

...
...

  with TTaskDialog.Create(self) do
  try
    Caption := 'test';
    Title := 'test';
    CommonButtons := [tcbClose];
    Text := 'blah blah this is very long test.  It goes on and on and on ' +
            'about nothing really.  IfThereIsLongTextAndAHyperLinkThenItWillWrapAroundInsteadOfBeCutOffWithAnEllipsis.' +
            #13#10#13#10'<a href="https://www.google.com/">https://www.google.com/</a>';
    Flags := [tfAllowDialogCancellation, tfEnableHyperlinks];
    CustomMainIcon := Application.Icon;
    Execute;
  finally
    Free;
  end;
John-Dorlon commented 5 months ago

image