Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
John-Dorlon opened this issue Mar 22, 2024 · 2 comments

Comments

@John-Dorlon
Copy link

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
Copy link
Author

image

@ansgarbecker
Copy link

I have the same issue - reported in HeidiSQL/HeidiSQL#2036

If I remove Vcl.Styles.Utils.Forms from the uses clause, the dialogs have white background (where the black text is not an issue, but then again it's the wrong background PLUS wrong foreground):

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants